Autonomic control of a distributed computing system using finite state machines

ABSTRACT

In general, this disclosure describes techniques of managing resources in a service-oriented distributed computing system. As described in this disclosure, one or more control nodes provide for the efficient and automated allocation and management of resources within the distributed computing system. In order to provide automated allocation and management of computing functions and resources, a control node uses a set of governors. This set of governors includes a set of service governors to govern services used in the distributed computing system. The set of governors also includes a set of resource governors that govern individual resources of the services in the distributed computing system. The service governors and the resource governors may be implemented using finite state machines.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. application Ser. No.11/823,174 filed Jun. 27, 2007 and titled “Autonomic Control of aDistributed Computing System Using Finite State Machines”, now issued asU.S. Pat. No. 7,895,317.

TECHNICAL FIELD OF THE INVENTION

The invention relates to computing environments and, more specifically,to distributed computing systems.

BACKGROUND OF THE INVENTION

Distributed computing systems are increasingly being utilized to supportbusiness as well as technical applications. Typically, distributedcomputing systems are constructed from a collection of computing nodesthat combine to provide a set of processing services to implement thedistributed computing applications. Each of the computing nodes in thedistributed computing system is typically a separate, independentcomputing device interconnected with each of the other computing nodesvia a communications medium, e.g., a network.

One challenge with distributed computing systems is the organization,deployment and administration of such a system within an enterpriseenvironment. For example, it is often difficult to manage the allocationand deployment of enterprise computing functions within the distributedcomputing system. An enterprise, for example, often includes severalbusiness groups, and each group may have competing and variablecomputing requirements.

SUMMARY OF THE INVENTION

In general, this disclosure describes techniques of managing resourcesin a service-oriented distributed computing system. As described in thisdisclosure, one or more control nodes provide for the efficient andautomated allocation and management of resources within the distributedcomputing system. In order to provide automated allocation andmanagement of computing functions and resources, a control node uses aset of governors. This set of governors includes a set of servicegovernors to govern services used in the distributed computing system.The set of governors also includes a set of resource governors thatgovern individual resources of the services in the distributed computingsystem. The service governors and the resource governors may beimplemented using finite state machines.

In one embodiment, a distributed computing system comprises a first setof resources. Resources in the first set of resources are capable ofproviding a flux service. A service is a defined set of functionality.The distributed computing system also provides a second set ofresources. Resources in the second set of resources are capable ofproviding interpreting services. In addition, the distributed computingsystem comprises a control node that autonomically controls thedistributed computing system. The control node comprises a first set ofresource governors, each of which implement a finite state machine thatgoverns a process by which an individual one of the resources in thefirst set of resources starts providing or stops providing the fluxservice. The control node also comprises a first service governor. Thefirst service governor implements a finite state machine that controlswhether resource governors in the first set of resource governorsinitiate the processes by which resources in the first set of resourcesstart providing or stop providing the flux service. The control nodealso comprises a service-level agreement (SLA) governor that receivesmonitoring data that indicate a current service level of the fluxservice provided by the distributed computing system and causes thefirst service governor to enhance the service level of the flux servicewhen the current service level of the flux service does not satisfy aservice-level agreement.

In another embodiment, a method comprises receiving, with a control nodeof the distributed computing system, input that defines a service-levelagreement. The method also comprises receiving status data fromresources that provide services in the distributed computing system,wherein a service is a defined set of functionality. In addition, themethod comprises using the status data to determine whether a currentservice level of a flux service provided by the distributed computingsystem satisfies the service-level agreement. Furthermore, the methodcomprises initiating, when a finite state machine of first servicegovernor is in a first state and when the current service level of aflux service does not satisfy the service-level agreement, a process ofa first resource governor by which a first resource in a first set ofresources starts providing the flux service. Each resource in the firstset of resource is capable of providing the flux service. The methodalso comprises controlling, with a finite state machine of the firstresource governor, the process by which a first resource in the firstset of resources starts providing the flux service.

In another embodiment, a computer-readable medium comprisesinstructions. The instructions cause a programmable processor toreceive, with a control node of the distributed computing system, inputthat defines a service-level agreement. The instructions also cause theprocessor to receive status data from resources in the distributedcomputing system. In addition, the instructions cause the processor touse the status data to determine whether a current service level of theflux service satisfies the service-level agreement. Furthermore, theinstructions cause the processor to initiate, when a finite statemachine of first service governor is in a first state and when thecurrent service level of a flux service does not satisfy theservice-level agreement and when a current state of a finite statemachine of the first service governor allow such initiation, a processof a first resource governor by which a first resource in a first set ofresources starts providing the flux service, wherein each resource inthe first set of resource is capable of providing the flux service. Theinstructions also cause the processors to control, with a finite statemachine of the first resource governor, the process by which a firstresource in the first set of resources starts providing the fluxservice.

The details of one or more embodiments of the invention are set forth inthe accompanying drawings and the description below. Other features,objects, and advantages of the invention will be apparent from thedescription and drawings, and from the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an exemplary distributedcomputing system.

FIG. 2 is a block diagram illustrating a set of example resource chains.

FIG. 3 is a block diagram illustrating example details of the controlnode.

FIG. 4 is a block diagram illustrating example details of a monitoringinfrastructure.

FIG. 5 is a block diagram illustrating example details of a governanceinfrastructure.

FIG. 6 is a block diagram illustrating exemplary details of a chainassembly module.

FIG. 7 is a flowchart illustrating an exemplary high-level operation ofthe chain assembly module.

FIG. 8 is a flowchart illustrating an exemplary operation of a servicematching module.

FIG. 9 is a flowchart illustrating an exemplary operation of a resourcechain identification module.

FIG. 10 is a flowchart that illustrates an example operation by whichthe resource chain identification module may identify a set of candidateresource chains for a service chain.

FIG. 11 is a flowchart illustrating an exemplary operation of a resourceconstraint module.

FIG. 12 is a flowchart illustrating an exemplary operation of a costanalysis module.

FIG. 13 is a flowchart illustrating an exemplary operation of the costanalysis module to calculate harvest costs for a set of candidateresource chains.

FIG. 14 is a flowchart illustrating an exemplary operation of a resourcereservation module.

FIG. 15 is a block diagram illustrating an exemplary finite statemachine that implements the functionality of a service governor.

FIG. 16 is a block diagram illustrating an exemplary finite statemachine that implements the functionality of a resource governor.

FIG. 17 is a block diagram illustrating example details of aService-Level Agreement (SLA) governor.

FIG. 18 is a block diagram of an example working memory associated withthe SLA governor.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 is a block diagram illustrating an exemplary distributedcomputing system 2. As illustrated in the example of FIG. 1, distributedcomputing system 2 includes a communications network 8 that facilitatescommunication among a control node 6 and set of computing nodes 4Athrough 4N (collectively, “computing nodes 4”). Network 8 may comprise,for example, direct connections between one or more of computing nodes4, one or more customer networks maintained by an enterprise, one ormore local-area networks (LANs), one or more wide-area networks (WANs)or a combination thereof. For example, network 8 may comprise alocal-area Ethernet network or a wide-area network such as the Internet.Although not illustrated in the example of FIG. 1, network 8 may includea number of switches, routers, firewalls, load balancers, and the like.

Computing nodes 4 may operate in cooperation with each other to providedistributed processing services. The number of computing nodes 4 withindistributed computing system 2 may be dependent on the processingrequirements of distributed computing system 2. For example, distributedcomputing system 2 may include 8 to 512 computing nodes or more. Each ofcomputing nodes 4 may be a physical computing device that includes oneor more programmable processors that are capable of executing softwareinstructions stored on one or more computer-readable media. For example,computing nodes 4 may be personal computers, mainframe computers,supercomputers, servers, server blades, or other types of physicalcomputing devices.

Control node 6 controls computing nodes 4 in distributed computingsystem 2. For example, control node 6 may control which softwareresources operate on each of computing nodes 4. Although not shown inthe example of FIG. 1, distributed computing system 2 may include one ormore optional control nodes in addition to control node 6. Theseadditional control nodes may assist control node 6 with the managementfunctions. Moreover, such additional control nodes provide primary andbackup administration functions, thereby allowing for graceful failoverin the event that control node 6 fails.

Control node 6 may automatically discover computing nodes 4. Forexample, control node 6 may monitor Dynamic Host Configuration Protocol(DHCP) leases to discover the connection of a computing node to network8. Once detected, control node 6 may automatically inventory theattributes for the discovered computing node. The node attributesidentified during the inventory process may include a CPU count, a CPUspeed, an amount of memory (e.g., random access memory), local diskcharacteristics or other computing resources. Control node 6 may alsoreceive input identifying node attributes not detectable via theautomatic inventory, such as whether the node includes I/O, such as HostBus Adapter (HBA). Further details with respect to the automateddiscovery and inventory processes are described in U.S. patentapplication Ser. No. 11/070,851, entitled “AUTOMATED DISCOVERY ANDINVENTORY OF NODES WITHIN AN AUTONOMIC DISTRIBUTED COMPUTING SYSTEM,”filed Mar. 2, 2005, the entire content of which is hereby incorporatedby reference.

An administrator 12 may access administration software executing oncontrol node 6 to configure distributed computing system 2 to provideone or more services. As used in this disclosure, the term “service”refers to a set of functionality provided by a “resource.” As usedherein, a “resource” is something that provides a set of functionality.A “resource” may be a hardware unit, a software unit, a collection ofone or more hardware units, a collection of one or more software units,or a collection of one or more hardware units and one or more softwareunits. For example, an individual one of computing nodes 4 is a“resource” that provides the capacity to execute instructions in an x86instruction set. In this example, a service S may be defined as thecapacity to execute instructions in an x86 instruction set. Therefore,the individual computing node provides service S. In another example,distributed computing system 2 may be a “resource” that providese-commerce applications. In this example, a service T may be defined asthese e-commerce applications. Hence, distributed computing system 2 mayprovide service T.

In order to configure distributed computing system 2 to provide aservice, administrator 12 may access the administration software oncontrol node 6 to input a service definition that defines the service. Aservice definition may specify a set of “export facilities” and mayspecify a set of “import facilities.” As used in this disclosure, an“export facility” of a service is a type of functionality provided byresources associated with the service. Furthermore, an “import facility”of a service is a type of functionality provided by another service thatresources associated with the service require in order to operate. Asused herein, a resource “is associated with” a service when the resourceconforms to the service definition of the service. For example, aservice definition of service S may specify an export facility ofexecuting x86 assembly language instructions and may specify no importfacilities. In this example, a computing node that implements an x86architecture provides (i.e., exports) the functionality to executeinstructions in the x86 instruction set and does not require any importfacilities may be associated with service S. Continuing this example, anx86 emulator software application may provide the same set of exportfacilities as a computing node that implements the x86 architecture.However, the x86 emulator software application may utilize (i.e.,import) a facility that provides a PowerPC architecture.

After administrator 12 installs one or more services for use indistributed computing system 2 and configures one or more resourcesassociated with these services, administrator 12 may configure controlnode 6 to use the resources to bring distributed computing system 2 intocompliance with one or more service-level agreements. A service-levelagreement describes an expected level of service for a service providedby distributed computing system 2. For example, a service-levelagreement may specify a level of performance of a top-level service thatdistributed computing system 2 is expected to provide. A top-levelservice may be a service that provides functionality to a user ofdistributed computing system 2. In this disclosure, a top-level servicemay also be referred to as a “flux service.” In contrast, a service thatprovides functionality to another service within distributed computingsystem 2 may be referred to as an “interpretation service.” For example,an information technology (IT) department of a large corporation mayoperate distributed computing system 2 on behalf of the corporation. Ane-commerce division of the corporation may make a service-levelagreement with the IT department that distributed computing system 2will provide the functionality of an e-commerce web site to the public.Furthermore, the service-level agreement may specify that the web siteshould respond to a request for a credit card transaction in no morethan five seconds. In this example, the functionality of the e-commercewebsite may be a top-level service. Services, such as database accessservices, operating system services, and other types of services, thatenable the e-commerce website service to operate may be interpretationservices.

Distributed computing system 2 may utilize one or more resource chainsin order to provide a top-level service. A “resource chain” is a set ofone or more resources that are ordered according to the relation “afirst resource provides a service to a second resource.” The resourcesin a resource chain may work together to provide a service. For example,a service definition of a top-level service may specify that the firstservice exports web server functionality and may specify that thetop-level service imports Windows operating system functionality. Aservice definition of a second service may specify that the secondservice exports Windows operating system functionality and may specifythat the second service imports x86 assembly language executionfunctionality. A service definition of a third service may specify thatthe third service exports x86 assembly language execution functionalityand does not specify any imports. In this example, distributed computingsystem 2 may utilize a resource chain in order to provide web serverfunctionality. This resource chain may include a first resource that isassociated with the top-level service (web serving), a second resourcethat is associated with the second service (operating system), and athird resource that is associated with the third service (instructionexecution). The first resource, the second resource, and the thirdresource may work together to provide the web serving functionality ofthe top-level service.

Control node 6 may dynamically assemble or disassemble resource chainsin order to bring the service levels at which distributed computingsystem 2 provides services into compliance with one or moreservice-level agreements. To assemble a resource chain that provides atop-level service, control node 6 may identify one or more “servicechains.” A “service chain” is a set of one or more services that areordered by the relation “resources associated with a first serviceprovide a service to resources associated with a second service.” Asdescribed in detail below, control node 6 may then, for each service inthe identified service chain, identify a resource associated with theservice. Control node 6 may then assemble the identified resources intoa resource chain. When control node 6 assembles the identified resourcesto a resource chain, control node 6 may cause each of the identifiedresources to start operating with the other resources in the resourcechain. When each of the resources in the resource chain is operating,the resource chain provides the top-level service.

Control node 6 may use status data from resources in distributedcomputing system 2 to determine whether distributed computing system 2is currently providing services at levels required by the service-levelagreements. For example, control node 6 may receive status data from aresource associated with a first service (i.e., x86 computing node), aresource associated with a second service (i.e., Windows operatingsystem), and a resource of a third service (i.e., web serverapplication). The status data from the x86 computing node may indicatethat the temperature of the processor of the x86 is 35 degrees Celsius.The status data from the operating system may indicate that theoperating system is making extensive use of virtual memory. The statusdata from the web server application may indicate that the web serverapplication has received ten thousand requests in the last ten minutes.Based on the status data from these three resources, control node 6 maydetermine that distributed computing system 2 is not capable ofresponding to a request for a credit card transaction within fiveseconds, as required by the service-level agreement. In this situation,control node 6 may dynamically assemble one or more resource chains thatenhance the ability of distributed computing system 2 to handle requestsfor credit card transactions. As a result, distributed computing system2 may return to compliance with the service-level agreement.Alternatively, control node 6 may determine, based on the status data,that distributed computing system 2 has more than sufficient capacity torespond to requests for credit card transactions within five seconds. Inthis situation, control node 6 may automatically identify one or more ofthe resource chains that provide the credit card transaction service anddisassemble one or more of the resource chains. In this way, theresources in the disassembled resource chains may be available forsubsequent use in other resource chains.

Potential advantages of this approach may include the flexibility inbeing able to install and configure software services dynamically ratherthan rely on fixed sets of software services. In addition, theadvantages may include being able to choose a different computer onwhich to execute a software resource based on various factors at thetime the software resource is to be executed. Further, this approach mayreduce the number of preconfigured combinations of software servicesthat control node 6 manages.

FIG. 2 is a block diagram illustrating a set of example resource chains30A through 30D. This disclosure refers collectively to resource chains30A through 30N as “resource chains 30.”

When control node 6 determines that a level of service provided bydistributed computing system 2 does not comply with a service-levelagreement because distributed computing system 2 does not havesufficient capacity to provide a top-level service 32 associated withthe service-level agreement, control node 6 may need to enhance thecapacity of distributed computing system 2 to provide top-level service32. In order to enhance the capacity of distributed computing system 2to provide top-level service 32, control node 6 may dynamically assembleresource chains 30.

In order to assemble resource chains 30, control node 6 may firstidentify one or more service chains whose associated resources may worktogether to provide top-level service 32. As illustrated in the exampleof FIG. 2, services are illustrated as dotted rectangles. In thisexample, control node 6 may identify three different service chains. Afirst one of these service chains includes top-level service 32, a firstinterpretation service 34, an operating system service 36, and a firsttype of computing node service 38. A second one of these service chainsincludes top-level service 32, a second interpretation service 40, asecond type of operating system service 42, and a second type ofcomputing node service 44. A third one of these service chains includestop-level service 32, operating system service 42, and computing nodeservice 44. In this example, top-level service 32 may be a Java-basedpayroll application, interpretation service 34 may be an Javaapplication server service, operating system service 36 may be a Linuxoperating system, computing node service 38 may be a type of computingnode based on an x86 architecture, interpretation service 40 may be anapplication server service, operating system service 42 may be aMacintosh operating system, and computing node service 44 may be a typeof computing node based on a PowerPC architecture.

After identifying the service chains, control node 6 may identify one ormore resource chains for each of the identified service chains. Noresource chain may include more than one resource of one service. Asillustrated in the example of FIG. 2, control node 6 may identifyresource chains 30A through 30D for the identified resource chains. Forexample, resource chain 30A includes a resource 46 that is associatedwith top-level service 32, a resource 48 that is associated withinterpretation service 34, a resource 50 that is associated withoperating system service 36, and a computing node resource 52 that isassociated with computing node service 38.

Resources in resource chains 30 may provide services required byhigher-level resources in the resource chains. In other words, eachresource in a resource chain, other than a hardware resource, operateswithin an operating environment provided by a lower-level resource inthe resource chain. For example, resource 46 of top-level service 32 mayoperate within an operating environment provided by resource 48 ofinterpretation service 34. Furthermore, resource 48 of interpretationservice 34 may operate within an operating environment provided byresource 50 of operating system service 36. Resource 50 of operatingsystem service 36 may operate within an operating environment providedby resource 52 of computing node service 38.

Multiple resources may operate within a single operating environmentprovided by a resource. In other words, a single resource may provide aservice to multiple resources. For example, in resource chain 30C, aresource 70 associated with top-level service 32 may operate within anoperating environment provided by a resource 72 associated withinterpretation service 40. Resource 72 of interpretation service 40 mayoperate within an operating environment provided by a resource 74associated with operating system service 42. Furthermore, in resourcechain 30D, a resource 78 associated with top-level service 32 mayoperate within the operating environment provided by resource 74associated with operating system service 42. In other words, resource 72and resource 78 may use the same service provided by resource 74.

FIG. 3 is a block diagram illustrating example details of control node6. As illustrated in the example of FIG. 3, control node 6 may include anetwork interface 114 that facilitates communication between controlnode 6, resources in distributed computing system 2, and other deviceson network 8, such as a computer used by administrator 12. Although notillustrated in the example of FIG. 3, each of the modules of controlnode 6 may communicate with network interface 114.

As illustrated in the example of FIG. 3, control node 6 may include amonitoring infrastructure 102 that provides real-time monitoring ofdistributed computing system 2. For example, monitoring infrastructure102 may provide an operating environment in which collector modules mayoperate. Collector modules operating in monitoring infrastructure may bepluggable software modules that dynamically collect status data fromresources operating within distributed computing system 2. Monitoringinfrastructure 102 may use the status data to generate monitoring databased on the status data. The monitoring data generated by monitoringinfrastructure 102 may represent the actual state of the resources indistributed computing system 2.

A governance infrastructure 104 in control node 6 governs distributedcomputing system 2. Governance infrastructure 104 provides an operatingenvironment in which governor modules may operate. While control node 6is operating, one or more governor modules operating in governanceinfrastructure 104 may determine that the monitoring data frommonitoring infrastructure 102 indicate the service levels of servicesprovided by distributed computing system 2 are not in compliance withone or more service-level agreements installed in distributed computingsystem 2. For instance, one or more governor modules operating ingovernance infrastructure 104 may determine that distributed computingsystem 2 is not responding to requests fast enough to comply with aservice-level agreement.

When governor modules operating in governance infrastructure 104determines that a service level of a service provided by distributedcomputing system 2 is not in compliance with a service-level agreement,governor modules operating in governance infrastructure 104 may interactwith a chain assembly module 112 to dynamically assemble resource chainsin order to enhance this service level. Chain assembly module 112performs steps necessary to assemble resource chains when governanceinfrastructure 104 determines that the current service level does notsatisfy the service-level agreement. For example, a governor moduleoperating in governance infrastructure 102 may output an action requestto chain assembly module 112. In response to this action request, chainassembly module 112 may attempt to identify and assemble a resourcechain that most efficiently provides a top-level service. As a result ofassembling this resource chain, distributed computing system 2 may haveadditional capacity to provide the top-level service.

Furthermore, chain assembly module 112 may automatically configurecontrol node 6 to govern assembled resource chains. In configuringcontrol node 6 to govern a resource chain, chain assembly module 112 mayautomatically configure monitoring infrastructure 102 to receive varioustypes of status data from resources in the resource chain, and to outputmonitoring data regarding the resource chain in response to the receivedstatus data. In addition, chain assembly module 112 may automaticallyconfigure governance infrastructure 104 to receive monitoring dataregarding the resources in the resource chain and to output appropriateaction requests regarding these resources.

Control node 6 may include an action infrastructure 116. Actioninfrastructure 116 provides an operating environment in which serviceaction modules and resource action modules may operate. Each of theresource action modules may be a pluggable software module thatimplements a common set of methods that perform actions regarding aresource. Similarly, each of the service action modules may be apluggable software module that implements a set of methods that performactions regarding a service. For example, a particular software resourceonly communicates using Simple Network Management Protocol (SNMP). Inthis example, action infrastructure 116 may include a resource actionmodule for the particular software resource. This resource action modulecauses action infrastructure 116 to communicate with the particularsoftware resource using SNMP. In some instances, service action modulesand resource action modules may operate in action infrastructures onnodes of distributed computing system 2 other than control node 6. Forexample, an action infrastructure operating on computing node 4A mayprovide an operating environment in which a resource action moduleoperates. In this example, the resource action module may or may not beassociated with computing node 4A or a software resource that executeson computing node 4A.

Control node 6 may also include an administrative interface module 108that provides a user interface through which administrator 12 mayinteract with control node 6. For example, administrative interfacemodule 108 may provide a web interface that presents web pages thatadministrator 12 may use to configure control node 6. In anotherexample, administrative interface module 108 may provide a Telnet orSecure Shell command line interface, a special-purpose user interface,or another type of user interface. Although not illustrated in theexample of FIG. 3, administrative interface module 108 may interact witheach other component of control node 6.

Administrator 12 may use administrative interface module 108 toconfigure service-level agreements in distributed computing system 2.For example, administrator 12 may use administrative interface module108 to install a set of rules that represent a service-level agreement.In another example, administrator 12 may use administrative interfacemodule 108 to install in governance infrastructure 104 a governor modulethat determines whether a service level provided by distributedcomputing system 2 complies with a service-level agreement. When thisgovernor module determines that the service level provided bydistributed computing system 2 does not comply with the service-levelagreement, this governor module may attempt to enhance the service levelprovided by distributed computing system 2. This governor module may,for example, attempt to enhance the service level provided bydistributed computing system 2 by increasing the capacity of distributedcomputing system 2 to provide a top-level service. For instance, thegovernor module may increase the capacity of distributed computingsystem 2 to provide a top-level service by causing chain assembly module112 to assemble additional resource chains that provide the top-levelservice.

When administrator 12 uses administrative interface module 108 toconfigure a resource, administrative interface module 108 may storeresource configuration information for the resource in a resourceconfiguration repository 118 that stores resource configurationinformation. Resource configuration repository 118 may be present in apersistent or volatile computer-readable medium. For example, resourceconfiguration repository 118 may be present in a random access memoryunit, on a hard disk drive, or in another type of computer-readablemedium. The resource configuration information of a resource may specifywhether the resource is allocated to a resource chain, an InternetProtocol address associated with the resource, a path to a softwareimage of the resource, number of processors in a computing noderesource, amount of random access memory (RAM) in a computing noderesource, processor speed of a computing node resource, and otherresource-specific information.

In addition, administrator 12 may use administrative interface module108 to configure resources associated with installed services. Forexample, administrator 12 may instruct administrative interface module108 to govern ten resources of a particular service that administrator12 has previously installed in distributed computing system 10. Inanother example, administrator 12 may use administrative interfacemodule 108 to instruct governance infrastructure 104 to customizeresources of a particular service.

Administrator 12 may also use administrative interface module 108 toconfigure services in distributed computing system 2. For example,administrator 12 may use administrative interface module 108 to instructgovernance infrastructure 104 to start or stop using a service. Inaddition, administrator 12 may use administrative interface module 108to specify a maximum number of resources of a service that may becreated.

Administrator 12 may also use administrative interface module 108 toinstall or uninstall services. When administrator 12 installs a service,administrator 12 may cause administrative interface module 108 to storea service definition object of the service in a service definitionrepository 110. Service definition repository 110 may be present in apersistent or volatile computer-readable medium. For example, servicedefinition repository 110 may be present in a random access memory unit,on a hard disk drive, or in another type of computer-readable medium.

A service definition object may include parameters that define aservice. These parameters may include export and import parameters,asset consumption parameters, constraint parameters, blocked attributeparameters, monitored value parameters, priority parameters, sharingparameters, maximum resource parameters, external reference parameters,service configuration parameters, and service-level agreementparameters.

The export and import parameters of a service definition object of aservice specify facilities that resources associated with the serviceexport or import. A service definition object may classify exportfacilities and import facilities as either “static” or “dynamic.” Staticexport facilities and static import facilities do not include referencesto resources associated with the service. In contrast, dynamic exportfacilities and import facilities include references to resourcesassociated with the service.

Static export facilities and static import facilities may be“attributes” or “signatures.” An “attribute” may be a string ofcharacters that identifies a set of functionality. For example, aservice definition object of a first service may specify the followingas a static export attribute: “attribute (ia32);”. In this example, whenchain assembly module 112 is identifying service chains, chain assemblymodule 112 may pair this service with a second service when the servicedefinition object of the second service specifies “attribute (ia32)” asa static import facility.

An attribute may also specify a version. For example, a servicedefinition object of a first service may specify the following as astatic export attribute: “attribute (appserver, version (8, 1, 2));”.This attribute may indicate that the first service provides version8.1.2 of an application server. When chain assembly module 112 isidentifying service chains, an import attribute may be matched with anexport attribute that specifies a version when the import attribute doesnot specify any version. In addition, chain assembly module 112 may notmatch an import attribute with an export attribute that specifies aversion when the import attribute specifies a version that includes moredigits than the version specified by the export attribute. However, animport attribute may be matched with an export attribute when the importattribute includes fewer digits than the export attribute and all of thedigits in the import attribute are equal to corresponding digits in theimport attribute. For example, a first service definition object mayspecify “attribute (appserver, version (8, 1, 2))” as an exportattribute and a second service definition may specify “attribute(appserver, version (8, 1, 2, 5));” as an import attribute. In thisexample, chain assembly module 112 may not pair a service defined by thefirst service definition object and a service defined by the secondservice definition object because the version of import attribute“attribute (appserver, version (8, 1, 2, 5))” includes more digits thanthe version of export attribute “attribute (appserver, version (8, 1,2)).” However, a service defined by a service definition object thatspecifies an import attribute “attribute (appserver, version (8, 1))”may be matched with the export attribute “attribute (appserver, version(8, 1, 2))” because this import attribute version includes fewer digitsthan the export attribute version and the digits in the import attributeversion are equal to the corresponding digits in the export attributeversion.

A service definition object may specify one or more export attributes asrequired export attributes. A required export attribute of a firstservice is an attribute that a second service must import in order forthe first service to be matched to second service. In general, a servicedefinition object of a first service may specify a plurality of exportattributes. When chain assembly module 112 is identifying servicechains, chain assembly module 112 may match the first service with asecond service when the second service imports fewer than all of theattributes exported by the first service. For example, the servicedefinition object of the first service may specify the export attributes“attribute (appserver, version (8, 1, 2, 5))” and “attribute (ia32).” Inthis example, the service definition of the second service may specifythe import attribute “attribute (ia32).” Because the first serviceexports all of the attributes required by the second service, chainassembly module 112 may match the first service and the second service.However, if “attribute (appServer, version (8, 1, 2, 5))” is a requiredexport attribute, chain assembly module 112 would not match the firstservice and the second service because the second service does notimport “attribute (appServer, version (8, 1, 2, 5)).” Requiredattributed may be denoted with the “+” symbol. For instance, “+attribute(appServer, version (8, 1, 2, 5))” denotes that “attribute (appserver,version (8, 1, 2, 5))” is a required attribute.

A service definition object may specify one or more implied exportattributes. An implied export attribute is an attribute that a firstservice exports only when the first service imports attributes from asecond service and the second service exports a particular attribute.For example, a second service may export “attribute (x)” and “attribute(Y).” A first service may import “attribute (x)” and export “attribute(z)”. Furthermore, the first service may export “attribute (A)” when thefirst service is matched with a service that exports “attribute (Y)”. Inaddition, a third service may import “attribute (A)”. In this example,chain assembly module 112 may match the third service and the firstservice only when the first service has already been matched to thesecond service. This is because the first service only exports“attribute (A)” when the first service has been matched to a servicethat exports “attribute (Y)” and the second service exports “attribute(Y)”.

A service definition object may specify one or more import attributes asnegated import attributes. If a service definition object for a firstservice specifies a negated import attribute, the first service cannotbe matched with a service that exports that attribute. For example, aservice definition object for a first service may specify the negatedimport attribute “attribute (A)” (note the − indicating that the importattribute is negated). In this example, a second service may export“attribute (A)”. Because the service definition of the first servicecannot be matched with a service that exports “attribute (A)”, chainassembly module 112 does not match the first service and the secondservice, even if the second service exports all of the attributes thatthe first service imports.

A service definition object may specify one or more import attributes indisjunctive form. In other words, chain assembly module 112 may onlyneed to find one of the import attributes. For example, a servicedefinition object of a first service may specify “attribute (A) orattribute (B);”. In this example, chain assembly module 112 may matchthe first service to a second service that only exports “attribute (A)”.Furthermore, in this example, it may not be necessary for chain assemblymodule 112 to find a third service that exports “attribute (B)”.

A service definition object may also use “signatures” to specify staticimport facilities and static export facilities. As used herein, anexport “signature” of a service is a reference to a function implementedby resources associated with the service. An import “signature” of aservice is a reference to a function implemented by resources associatedby other services that resources associated with this service require inorder to operate. For example, a service definition object for a firstservice may specify the following as an export signature: “signature(int foobar (java.lang. String, int [ ] [ ], Boolean));”. This meansthat resources associated with the first service implement the function“int foobar (java.lang.String, int [ ] [ ], Boolean);”. Thus, a resourceassociated with a services that imports “signature (int foobar(java.lang.String, int [ ] [ ], Boolean))” may invoke the “int foobar(java.lang.String, int [ ] [ ], Boolean)” function implemented by aresource associated with the first service.

On occasion a service may import signatures having the same functionname. For instance, a service may import two signatures that specify thefunction name “foobar”. To differentiate between these two importsignatures, the service definition object may provide an alias for oneor more of these import signatures. For example, a service definitionobject may specify:

signature(int foobar(java.lang.String, int [ ] [ ], Boolean));

signature(int foobar(java.lang.String, Boolean) as foobar2);

In this example, foobar2 serves as an alias for the second foobarfunction.

“Dynamic” export facilities and import facilities include references toresources associated with the service. Dynamic export facilities may bedivided into two categories: “properties” and “assets.”

“Assets” represent consumable numeric values. Resources that depend onother resources may consume the assets of underlying resources. When anew resource requires more of an asset than an underlying resource hasavailable, chain assembly module 112 may 18 not assemble a resourcechain that includes the new resource and the underlying resource. Asdescribed below, resource action modules may provide methods by whichchain assembly module 112 may retrieve values of assets associated withindividual resources. For example, a resource action module may providea method “double getAsset (string AssetName)” that returns a doublevalue that indicates how much of an asset named by the parameter“AssetName” a resource associated with the resource action moduleprovides (e.g., 50.0 gigabytes). Service action modules may providedefault values for the assets.

A service definition object may specify one or more optional “assetconsumption” parameters. An “asset consumption” parameter in a servicedefinition object of a service specifies that resources associated withthe service consume a specific amount of a consumable asset provided bya resource associated with a different service. For example, a servicedefinition object of a first service may specify the following assetconsumption parameter:

assetConsumption: uses(collage/base:physicalmemory, 6.0);

This example asset consumption parameter indicates that resourcesassociated with the first service may be anticipated to use 6.0gigabytes of physical memory. In this example, when chain assemblymodule 112 is determining whether the first service can be matched witha second service, chain assembly module 112 may invoke methods getAsset(“collage/base:physicalMemory”) of resource action modules associatedwith resources associated with the second service in order to determinehow much physical memory each of the resources provide. When chainassembly module 112 invokes this method, one of the resource actionmodule may returns a value of 50.0, indicating that a resource Rassociated with this resource action module provides 50.0 gigabytes ofphysical memory for use by resources associated with other services.Thus, if chain assembly module 112 deploys a resource associated withthe first service to a chain such that the resource is dependent onresource R, there may be only 44 gigabytes of physical memory remainingfor use by resources associated with other services.

By default, chain assembly module 112 may not deploy a resourceassociated with a service to a resource chain when the resource chaindoes not have sufficient amounts of a dynamic asset to satisfy the assetconsumption parameters specified by the service definition object of theservice. Continuing the previous example, if a service definition objectof a third service specifies that resources associated with the thirdservice export the dynamic asset asset(collage/base:physicalMemory,5.0), resources associated with the third service would not providesufficient amounts of physical memory to satisfy the asset consumptionparameters specified by the service definition object of the firstservice. For this reason, chain assembly module 112 may not assemble aresource chain that includes resources associated with the first serviceand resources associated with the third service when the resources ofthe third service are the only exporters of physical memory.

Service definition objects may also specify one or more optionalconstraint parameters. Chain assembly module 112 may use constraintsspecified by a service definition object of a service to determinewhether an underlying resource can support the deployment of a resourcesassociated with the service. Constraints may comprise expressions overdynamic assets and dynamic properties. For example, a service definitionobject of a service may specify the following constraint parameter:

constraints: collage/base:physicalmemory >=6.0;

This example constraint parameter may indicate to chain assembly module112 that resources associated with the service may only be deployed to aresource chain when there are 6.0 gigabytes of physical memory or moreavailable in the resource chain.

A service definition object may also specify one or more dynamic exportor import properties. A dynamic export or import property represents anon-consumable resource features that chain assembly module 112 may usewhen checking whether resource chains comply with constraintrequirements. Chain assembly module 112 may retrieve an objectassociated with an export or import property by invoking a method of aresource action module associated with the export or import propertythat returns the object associated with the export or import property.The object associated with the export or import property may be anobject of any type. For example, chain assembly module 112 may invoke amethod “(onlinePortstructure)Object get Property (String propertyName)”.This method returns an object of a generic type “Object” that isassociated with a property named by the parameter “propertyName.” Theobject of type “Object” is then immediately cast into an object of type“onlinePortStructure”.

Chain assembly module 112 may provide special operations that supportproperties that return map objects. For example, a service definitionobject may use the following map operators:

-   -   P in S (P a key of map S)    -   P not in S (P not a key of map S)    -   S==S2 (S, S2 contain the same entries)    -   S !=S2 (S, S2 do not contain the same entries)−S<S2 (S subset of        S2)    -   S<S2 (S subset of S2)    -   S # S2 (S disjoint with S2)    -   S {<key>} (value associated with key in S; null if no associated        value) any <var> in S, <expression involving var>;        Service definition objects may use these map operations when        declaring export properties. For instance, a service definition        object may specify “property(foo, {“a”=5, “b”=“xyz”});” as an        export property. “property (foo, {“a”=5, “b”=“xyz”});” may        indicate that property “foo” maps the value “a” to “s” and maps        the value “b” to the “xyz”.

A service definition object may specify one or more constraintparameters that refer to import properties. For example, a servicedefinition object of a service may specify the following importparameter and the following constraint parameter:

imports: { property(collage/base:onlinePorts); } constraints: {collage/base:port in collage/base:onlinePorts; }The import parameter and the constraint parameter of this exampleindicate that chain assembly module 112 may not deploy resourcesassociated with the service unless “port” is one of the onlinePortsprovided by a resource associated with a lower-level service.

A service definition object may optionally specify one or more importedattributes as “blocked” attributes. For instance, by default, attributesimported by a service are available for use by resources associated withservices that are dependent on resources associated with the service.However, when a service definition object specifies a particularattribute as a blocked attribute, that attribute is not available toresources associated with services that are dependent on resourcesassociated with the service. For example, a software application mayoperate in an operating environment provided by an operating system andthe operating system may operate in an operating environment provided bya computing node that exports an attribute of executing IA32instructions attribute (ia32) and exports an attribute of direct controlof hard disks attribute (disk-control). In this example, attribute(ia32) is imported by the operating system, but is still available tothe software application. Thus, if the software application importsattribute (ia32), chain assembly module 112 may assemble a chain inwhich the software application is dependent on the operating system,even though the operating system does not explicitly export theattribute (ia32). However, the operating system may block the attributeof direct control of hard disks by including the following

blocked: { attribute(disk_control); }In this way, the service definition object of the operating systemservice indicates to chain assembly module 112 that services that aredependent the operating system service cannot useattribute(disk_control).

A service definition object for a service may specify one or moreoptional monitored value declarations. Monitored value declarationsspecify monitoring values that are monitored by a service governor ofthe service or that are monitored by resource governors of resourcesassociated with the service. Monitored value declarations that specifymonitored values that are monitored by the service governor of theservice are referred to herein as “service monitored values.” Monitoredvalue declarations that specify monitored values that are monitored bythe resources governors are referred to herein as “resource monitoredvalues.”

A monitored value declaration may specify one or more monitoring valuesin a variety of ways. For example, a monitored value declaration mayspecify a namespace that contains a name of a specified monitoringvalue, one or more collector objects in monitoring infrastructure 102that provide the specified monitoring value or that provides a valuefrom which a monitored value may be derived. In addition, a monitoredvalue declaration may specify an expression that defines the specifiedmonitoring value as a value derived from values provided by thecollector object. For example, a service definition object may includefollowing resource monitored value declaration:

resourceMonitoredValues( namespace(system/os), collector(snmp,values(*), “com.collectors.snmp”), expression(halfLoad, snmp:load / 2));This example resource monitored value declaration specifies the“system/os” namespace. Thus, names associated with the monitored valuesdeclared by this monitored value declaration exist within the context ofthe “system/os” namespace. This resource monitored value declarationalso specifies that a collector object named “com.collectors.sump”obtains status information from resources using the SNMP protocol andexposes all values collected. The expression term declares an additionalmonitoring value “half Load” that is derived by dividing the “load”value provided by the SNMP collector by two.

Monitored value declarations may also specify that only some of thevalues provided by a collector object are available. For example, aservice definition object may include the following resource monitoredvalue declaration:

serviceMonitoredValues( namespace(sample/module/sl), collector(jmx,values(xxx, yyy), “com.collectors.jmxisr160”));In this example, the “com.collectors.jmxJsrl60” collector may typicallyprovide values “xxx”, “yyy”, and “zzz”. However, the term “values (xxx,yyy)”, restricts the values provided by “com.collectors.jmxJsrl60” tothe values “xxx” and “=”. If this service definition object were tospecify the term “values(−)” instead of “values (xxx, yyy)”, all valuesprovided by “com.collectors.jmxJsrl60” would be available (i.e., “xxx”,“yyy”, and “zzz”).

Monitored value declarations may also specify an independent file thatincludes one or more monitored value declarations. For example, thefollowing service monitored value declaration specifies an independentfile that includes one or more monitored value declarations:

serviceMonitoredValues(definition(foo/bar: some SvcTypeMVDef));

In this example, “some SvcTypeMVDef” is a file name within the namespace“foo/bar”. When chain assembly module 112 assembles a resource chainthat includes the service, chain assembly module 112 automaticallyincorporates any monitored values specified in this independent fileinto the service definition of the service. Multiple service definitionobjects 23 may include monitored value declarations that specify thisindependent file. In this way, each of these service definition objectsmay be made more concise.

Monitored value declarations may refer to a plurality of collectorobjects. Such monitored value declarations may use values provided bythese collector objects in an expression that provides a new monitoredvalue. For example, a service definition object may include thefollowing monitored value declaration:

resourceMonitoredValues( namespace(system/resource), collector( snmp,“com.collectors.snmp”, parameters(interval(10), heartbeat(30),timeout(20))), collector( ping, “com.collectors.ping”,parameters(interval(5), heartbeat(30), timeout(20))), expression(online,snmp:isConnected && ping:isConnected));In this example, the collectors “com.collectors.snmp” and“com.collectors.ping” do not provide any monitored values. However, theexpression statement provides a monitored value “online” that is truewhen the “isconnected” value of the “snmp” collector is true and whenthe “is Connected” value of the “ping” collector is also true.

A service definition object of a service may specify an optionalpriority for the service. Automation infrastructure 102 may use thispriority when determining whether to harvest resources associated withthis service. For example, a service definition object of a firsttop-level service may specify a priority of 16 and a service definitionobject of a second top-level service may specify a priority of 32. Inthis example, automation infrastructure 102 may determine that it isnecessary to harvest resources in order to provide a particulartop-level service. When this occurs, automation infrastructure 102 mayharvest resources from resource chains that provide the first top-levelresource rather than from resource chains that provide the secondtop-level resource because the service definition object of the secondtop-level resource specifies a higher priority than the servicedefinition object of the first top-level resource. If a servicedefinition object of a service does not specify a priority, the servicemay be presumed to have a priority of zero (i.e., the lowest priority).

A service definition object of a service may specify an optional sharingparameter. Sharing parameters determine whether or not resourcesassociated with other services may import facilities that are exportedby resources in resource chains that include resources associated withthis service. In one example implementation, a service definition objectmay specify one of an “allow” sharing parameter, a “below” sharingparameter, or a “deny” sharing parameter. In this exampleimplementation, if a service definition object does not specify asharing parameter, chain assembly module 12 may use resources associatedwith the service as though the service definition object had specifiedan “allow” sharing parameter.

An “allow” sharing parameter indicates that one or more resourcesassociated with other services may share any resource in a resourcechain that includes resources associated with the service. For instance,distributed computing system 2 may include a first resource, a secondresource, a third resource, and a fourth resource. If a servicedefinition object of a service with which the fourth resource isassociated specifies an “allow” sharing parameter, the second resourceand the third resource may both operate within an operating environmentprovided by the first resource and the fourth resource may operatewithin an operating environment provided by the third resource.Alternatively, the fourth resource may be used in a resource chain inwhich the fourth resource operates in an operating environment providedby the first resource and the second resource and the third resourceoperate within an operating environment provided by the fourth resource.

A “below” sharing parameter indicates that one or more resources mayshare any resource in a resource chain below a resource associated withthe service. For instance, distributed computing system 2 may includemay include a first resource, a second resource, a third resource, and afourth resource. If a service definition object of a service with whichthe fourth resource is associated specifies a “below” sharing parameter,the second resource and the third resource may operate within anoperating environment provided by the first resource and the fourthresource may operate within an operating environment provided by thethird resource. However, because the service definition object specifiesa “below” sharing parameter, the fourth resource may not be used in aresource chain in which the fourth resource operates in an operatingenvironment provided by the first resource and the second resource andthe third resource operate within an operating environment provided bythe fourth resource.

A “deny” sharing parameter indicates that no resource may share anyresource in a resource chain that includes a resource associated withthe service. For instance, distributed computing system 2 may includemay include a first resource, a second resource, a third resource, and afourth resource. If a service definition object of a service with whichthe fourth resource is associated specifies a “deny” sharing parameter,the fourth resource may not be used in a resource chain in which thesecond resource and the third resource operate within an operatingenvironment provided by the first resource and the fourth resourceoperates within an operating environment provided by the third resource.In addition, because the service definition object specifies a “deny”sharing parameter, the fourth resource may not be used in a resourcechain in which the fourth resource operates in an operating environmentprovided by the first resource and the second resource and the thirdresource operate within an operating environment provided by the fourthresource.

A service definition object may also specify an optional “max resources”parameter. If resources associated with a service must be customized inorder to operate, a service definition object of the service may berequired to specify a “max resources” parameter. A “max resources”parameter of a service definition object for a service may indicate anumber of resources associated with the service that may be customized.Because these resource must be customized in order to operate, thisnumber may indicate the maximum number of resources associated with theservice that may be used within distributed computing system 2.

A service definition object for a service may specify a service governorthat operates in governance infrastructure 104. For example, a servicedefinition object may include the following to specify a servicegovernor:

serviceClass: com.sample.ExampleServiceClass;

In this example, “com.sample.ExampleServiceClass” is a name of a servicegovernor that governs a service defined by the service definitionobject.

In addition, a service definition object may specify a resource governorthat operates in governance infrastructure 104. For example, a servicedefinition object may include the following to specify a resourcegovernor:

resourceClass: com.sample.ExampleResourceClass;

In this example, “com.sample.ExampleResourceClass” is a name of aresource governor that governs resources associated with the servicedefined by the service definition object.

If the service defined by the service definition object is a top-levelservice, the service definition object may also specify an SLA governorthat operates in governance infrastructure 104. For example, a servicedefinition object may include the following to specify a SLA governor:

slaClass: com.sample.ExampleSLAClass;

In this example, “com.sample.ExampleSLAClass” is a name of a SLAgovernor that determines whether distributed computing system 2 providesa level of the service defined in the service definition object that isin conformity with a service-level agreement.

A service definition object for a top-level service may specify one ormore parameters that determine how many resources of the top-levelservice should be running in distributed computing system 2. Forexample, a service definition object of a top-level service may specifythe following top-level service parameters:

sla { min (1); max(4); lowThreshold(“collage/base:resourceCount”, 2);highThreshold(“collage/base:resourceCount”, 2); }In this example, the “min (1)” parameter of the service definitionobject specifies that distributed computing system 2 should run at leastone resource associated with the top-level service and the “max (4)”parameter specifies that distributed computing system 2 should run nomore than four resources associated with the top-level service.Furthermore, the “lowThreshold (“collage/base: resourceCount”, 2)”parameter indicates that distributed computing system 2 should attemptto operate no fewer than two resources associated with the top-levelservice. The “highThreshold (“collage/base: resourceCount”, 2)”parameter indicates that distributed computing system 2 should notattempt to operate more than two resources associated with the top-levelservice. The service definition object may also specify top-levelservice parameter thresholds for each expression defined in the SLAgovernor class specified in the service definition object.

FIG. 4 is a block diagram illustrating example details of monitoringinfrastructure 102. In general, monitoring infrastructure 102 receivesstatus data from resources in distributed computing system 2 and outputsmonitoring data based on the status data. This monitoring data mayrepresent a current state of distributed computing system 2. Forexample, monitoring infrastructure 102 may identify, in a timely andefficient manner, any computing nodes that have failed, i.e., any nodethat does not respond to a request to a known resource. More generally,monitoring infrastructure 102 provides a concise, consistent andconstantly updating view of the resources of the fabric.

As illustrated in the example of FIG. 4, monitoring infrastructure 102may include a set of collector modules 412A through 412N (collectively,“collector modules 412”). Collector modules 412 may be pluggablesoftware objects that implement a common set of methods. For example,collector modules 412 may be Java code compiled into ajar file andloaded with a class loader at run time. When invoked, the methods maycause collector modules 412 to collect monitoring data from variousresources allocated to various resource chains in distributed computingsystem 2. In this example, monitoring infrastructure 102 includescollector modules 412A through 412N for collecting status data fromcomputing node resources, operating system resources, and applicationresources allocated to resource chains 414A and 414N, respectively.

Monitoring infrastructure 102 may start and stop the operation ofcollector modules 412 in response to action requests from governanceinfrastructure 104. For example, a monitoring engine 460 in monitoringinfrastructure 102 may receive collection requests from governanceinfrastructure 104, sort and prioritize the collection requests, andinvoke an appropriate one of collector modules 412 based on thecollection requests. The invoked collector module is responsible forcollecting the required status data and returning the status data tomonitoring engine 460. If the invoked collector module is unable tocollect the requested status data, the collector module may return anerror code.

Each of collector modules 412 may be associated with a configurationfile written in a data description language, such as the extensiblemarkup language (XML). Administrator 12 may interact with administrativeinterface module 108 to dynamically configure collector modules 412. Forexample, administrator 12 may specify the protocol or protocols to beused for monitoring resources of a service when the user installs theservice. In addition, the user may specify the protocols to be used formonitoring the computing nodes and each resource. Example protocolssupported by collector modules 412 may include Secure Shell (SSH),Simple Network Management Protocol (SNMP), Internet Control MessageProtocol (ICMP) ping, Java Management Extensions (JMX), and theHypertext Transfer Protocol (HTTP).

Some protocols require special privileges to perform the required datacollection. For example, some protocols may require root privileges toperform the required data collection. In this case, the ones ofcollector modules 412 that utilize such protocols may communicate with aseparate process that executes with root privilege. Moreover, someprotocols may require deployment and/or configuration of data providerswithin the fabric. Software agents may, for example, be installed andconfigured on nodes and configured on other hardware.

FIG. 5 is a block diagram illustrating example details of governanceinfrastructure 104. As illustrated in the example of FIG. 5, governanceinfrastructure 104 includes a sensor subsystem 420, a set ofservice-level agreement (SLA) governors 430A through 430N (collectively,“SLA governors 430”), a set of service governors 432A through 432N(collectively, “service governors 432”), and a set of resource governors434A through 434N (collectively, “resource governors 434”).

Sensor subsystem 420 receives monitoring data from monitoringinfrastructure 102 and outputs events based on the monitoring data. SLAgovernors 430, service governors 432, and resource governors 434 mayreceive events from sensor subsystem 420 and output action requestsbased on the events.

In order to output events based on monitoring data, sensor subsystem 420may receive an ongoing, dynamic stream of monitoring data frommonitoring infrastructure 102. As discussed above, this monitoring datamay represent an actual state of distributed computing system 2. Sensorsubsystem 420 may use the monitoring data to maintain ongoing,calculated values. Sensor subsystem 420 may then use these calculatedvalues to generate events. For example, sensor subsystem 420 may usemonitoring data that indicates the instantaneous processing load ofcomputing nodes in resource chains that provide functionality of atop-level service in order to calculate a weighted moving average of theprocessing load of these computing nodes. If the weighted moving averageof the processing load for these computing nodes exceeds a giventhreshold (e.g., 95%), sensor subsystem 420 may output an event thatindicates that distributed computing system 2 may not currently havesufficient capacity to provide the top-level service.

Administrator 12 may customize sensor subsystem 420 by adding pluggabletrigger objects 422A through 422N (collectively, “trigger objects 422”)to sensor subsystem 420. Trigger objects 422 may perform arbitrary dataaggregations. Each of trigger objects 422 may be registered under acompound name based on the entity being monitored and the type of databeing gathered. For example, trigger object 422A may be defined toaggregate and compute an average computing load for a set of resourcechains that provide a top-level service every five minutes. SLAgovernors 430, service governors 432, or resource governors 434 mayrequest the aggregated data based on the registered names.

Sensor subsystem 420 may communicate the events to SLA governors 430,service governors 432, or resource governors 434 on a periodic orevent-driven basis. For example, SLA governors 430 may registerinterests in a particular event with sensor subsystem 420 and requestupdates at a specified frequency. In response, sensor subsystem 420 mayinteract with monitoring infrastructure 102 to generate the aggregateddata required by SLA governors 430.

SLA governors 430 may be software objects that operate in the operatingenvironment provided by governance infrastructure 104. Each of SLAgovernors 430 receive monitoring data that indicate a current servicelevel of a service provided by distributed computing system 2 anddetermine whether the current service level of the service satisfies aservice-level agreement. If one of SLA governors 430 determines that acurrent service level of a service provided by distributed computingsystem 2 is not in compliance with a service-level agreement, the SLAgovernor may output events that cause distributed computing system 2 toenhance the current service level of the service. In addition, if one ofSLA governors 430 determines that a current service level of a serviceprovided by distributed computing system 2 exceeds a service levelrequired by a service-level agreement, the SLA governor may outputevents that cause distributed computing system 2 to provide a lowerservice level of the service. Causing distributed computing system 2 toprovide a lower service level of a service may make resources availableto provide other services.

When administrator 12 installs a service definition object,administrator 12 may install one of service governors 432 in governanceinfrastructure 104. Each of service governors 432 may be a softwareobject that operates in the operating environment provided by governanceinfrastructure 104. Each of service governors 432 “governs” anindividual service. That is, each service governor controls howresources that provide a different service are used within thedistributed computing system. Service governors 432 may govern a serviceby controlling statuses of resources that provide the service.

Each resource may have a status of “started”, “stopped”, “failed”,“failed to start”, “failed to stop”, “available”, and “allocated.” Astatus of “started” may indicate that the resource is currentlyoperating in a resource chain. A status of “stopped” may indicate thatthe resource is currently in a resource chain, but is not currentlyoperating. A status of “failed” may indicate that an error has occurredand the resource is not operable. A status of “failed to start” mayindicate that a resource is in a resource chain, but due to an error,the resource has failed to start operating despite a request to do so. Astatus of “failed to stop” may indicate that a resource is in a resourcechain, but due to an error, the resource has failed to stop operatingdespite a request to do so. A status of “available” may indicate that aresource is not in a resource chain and is available to be allocated toa resource chain. A status of “allocated” may indicate that a resourcehas been allocated to a resource chain, but a request to start theresource has not yet been issued. Chain assembly module 112 might notidentify a resource for use in a resource chain if the resource has astatus of “failed”, “failed to start”, or “failed to stop.”

Service governors 432 may update the statuses of resources governed byservice governors 432 in response to events from SLA governors 430 andresource governors 434. For example, service governor 432A may receivean event that indicates that a resource associated with a servicegoverned by service governors 432A has failed. In this example, servicegovernor 432A may invoke a method of a service action module in actioninfrastructure 116 to update the status of this resource to indicatethat the resource has failed. Because the resource configuration datafor this resource indicates that this resource has failed, chainassembly module 112 does not identify candidate resource chains thatinclude this resource.

As described in detail below, chain assembly module 112 uses thestatuses of resources when identifying candidate resource chains. Forexample, if a resource has the status “started”, chain assembly module112 may take steps to harvest the resource in order to assemble aresource chain that includes the resource.

When administrator 12 configures distributed computing system 2 to use aresource, administrator 12 may install one of resource governors 434 ingovernance infrastructure 104. Each of resource governors 434 governs aprocess by which an individual one of the resources starts providing orstops providing a service. As described in detail below, each ofresource governors 434 may output action requests to resource actionmodules in action infrastructure 116. These action requests may requestthe resource action module to communicate with the resources to instructthe resources to perform various activities relating to the start-up orshut-down of individual resources.

SLA governors 430, service governors 432, and resource governors 434 mayprovide events to one another. For example, ones of SLA governors 430may provide events to ones of service governors 432. Furthermore, eachof service governors 432 may provide events to ones of resourcegovernors 434 that govern resources of the service governed by theservice governor. For example, resource governor 434A and resourcegovernor 434B may govern resources of a particular service. Servicegovernor 432A may govern that service. In this example, resourcegovernors 434A and 434B may provide events to service governor 432A andservice governor 432A may provide events to resource governors 434A and434B.

Resource governors 434 may also provide events to other resourcegovernors 434. Individual ones of resource governors 434 may beassembled into chains of resource governors. A chain of resourcegovernors governs the behavior of a resource chain. For example, a webserver application may operate within an operating environment providedby a Linux operating system, and the Linux operating system may operatewithin an operating environment provided by an x86 computing node. Inthis example, the x86 computing node, an instance of the Linux operatingsystem, and an instance of the web server application each representindividual resources. A chain of resource governors may include aresource governor to govern the x86 computing node, a resource governorto govern the Linux operating system, and a resource governor to governthe web server application.

A chain of resource governors may include a plurality of branches.Continuing the previous example, a File Transfer Protocol (FTP) serverapplication may operate within the operating environment provided by theLinux operating system. In this example, the chain of resource governorsmay include a resource governor that governs the FTP server application,a resource governor that governs the web server application, a resourcegovernor that governs the Linux operating system, and a resourcegovernor that governs the x86 application node. The chain of resourcegovernors in this example includes two branches because both the webserver application and the FTP server application depend on theoperating environment provided by the Linux operating system but do notdepend on the functionality of each other to operate successfully.

A resource governor in a chain of resource governors may “propagate”events to an immediately lower resource governor in the chain ofresource governors. Propagation of an event implies providing an eventto one other resource governor. Continuing the previous example, theresource governor that governs the web server application may propagatean event to the resource governor that governs the Linux operatingsystem and the resource governor that governs the FTP server applicationmay also propagate an event to the resource governor that governs theLinux operating system. In addition, the resource governor that governsthe Linux operating system may propagate an event to the resourcegovernor that governs the x86 application node. Because, in thisexample, the resource governor that governs the x86 application node isthe lowest resource governor in the chain, the resource governor thatgoverns the x86 application node does not propagate events to any otherresource governor. When a resource governor in a chain of resourcegovernors receives an event propagated to the resource governor, theresource governor may output some action to a resource action moduleassociated with the resource governed by the resource governor.

A resource governor in a chain of resource governors may also “publish”resource events to be received by immediately higher resource governorsin the chain of resource governors. Publication of an event impliesproviding an event to one or more other resource governors. When aresource governor is initially constructed and configured into a chainof resource governors, the resource governor may be configured to“subscribe” to events published by an immediately lower resourcegovernor in the chain. Continuing the ongoing example, the resourcegovernor that governs the x86 application node may publish events thatare received by the resource governor that governs the Linux operatingsystem. The resource governor that governs the Linux operating systemmay publish events that are received by the resource governor thatgoverns the web server application and by the resource governor thatgoverns the FTP application.

When chain assembly module 112 receives a request for a new instance ofa resource from one of service governors 432, chain assembly module 112may configure one or more of resource governors 434 to act as a chain ofresource governors. To configure one or more of resource governors 434to act as a chain of resource governors, chain assembly module 112 mayconfigure resource governors 434 to propagate events to and subscribe toevents from a resource governor that governs a lower-level resource. Forexample, a resource governed by resource governor 434A may provide anoperating environment in which a resource governed by resource governor434C operates. In this example, chain assembly module 112 may configureresource governor 434C to subscribe to events published by resourcegovernor 434A and to propagate events to resource governor 434A.

SLA governors 430, service governors 432 and resource governors 434 maybe implemented in a variety of ways. In one example implementation, SLAgovernors 430, service governors 432, and resource governors 434 maycomprise one or more rules engine. In this example, a rules engine inone of the governors matches patterns in events presented by sensorsubsystem 420, another one of the governors, or action infrastructure116. Governance infrastructure 104 may allow rule sets to be loaded insource form and compiled at load time into discrimination networks. Eachrule set specifies trigger-delivered attributes. Upon loading the rulesets, a governor may establish trigger listeners to receive sensornotifications and update respective working memories of the rule enginesin the governor.

Each of the rule engines may be software objects that perform logicalreasoning using knowledge encoded in high-level condition-action rules.Each of the rule engines may apply automated reasoning that worksforward from preconditions toward goals defined in a service-levelagreement. For example, the rule engines may apply modus ponensinferences rules. In this example, the rule engines may process theevents, identify actions, and request that action infrastructure 116perform the identified actions. In addition, the rule engines mayprovide a call-back interface so that action infrastructure 116 mayinform a rule engine when an action has completed. The rule engines mayprevent a particular rule from re-firing as long as any action invokedby the rule has not finished.

In another example implementation, some or all of SLA governors 430,service governors 432, and resource governors 434 may comprise finitestate machines. In general terms, a finite state machine is a datastructure defined by a set of states, a set of transitions, and acurrent state. When one of SLA governors 430, service governors 432, orresource governors 434 receives an event, the finite state machine maytransition between states and performs various actions during suchtransitions. This disclosure refers to a finite state machinesimplemented by SLA governors 430 as the SLA FSMs, to finite statemachines implemented by service governors 432 as service FSMs, and tofinite state machines implemented by resource governors 434 as resourceFSMs.

SLA FSMs may include a set of states and a set of transitions that aredifferent than the sets of states and sets of transitions included inservice FSMs and resource FSMs. Similarly, each service FSM may includea common set of states and a common set of transitions that aredifferent than the sets of states and sets of transitions included inservice FSMs and resource FSMs. Each resource FSM may include a commonset of states and a common set of transitions that are different thanthe sets of states and sets of transitions included in the SLA FSM andservice FSMs. However, each of the SLA FSMs, each of the service FSMs,and each of the resource FSMs may have different current states.

Some states in SLA FSMs, service FSMs, and resource FSMs may be“persistent states.” When a service FSM or a resource FSM transitionsinto a persistent state, the service FSM or resource FSM may store thestate variables of the service FSM or the resource FSM to state variablerepository 336. If control node 6 failed while operating, control node 6may retrieve the state variables stored in the persistent storage mediumwhen control node 6 resumes operations. In this way, control node 6 mayresume operations in the same or about the same state as before controlnode 6 failed.

Administrator 12 may use spreadsheets to configure finite state machinesin SLA governors 430, service governors 432, and resource governors 434.For example, administrator 12 may generate a spreadsheet that defines afinite state machine by defining each state, each transition, and eachaction performed during each of the transitions. Administrator 12 maythen provide the spreadsheet to administrative interface module 108.Administrative interface module 108 may then use the spreadsheet toconfigure a finite state machine in one of SLA governors 430, servicegovernors 432, or resource governors 434. In another example,administrator 12 may provide custom Java objects that define SLAgovernors 430, service governors 432, and resource governors 434.

Implementations of SLA governors 430, service governors 432, andresource governors 434 that comprise finite state machines may presentseveral advantages. For example, finite state machines may berepresented in a terse format, such as a spreadsheet, that a human caneasily understand. In this example, a finite state machine representedby a spreadsheet may be automatically compiled into Java code.Administrator 12 may then use administrative interface module 108install the Java code into control node 6. In another potentialadvantage, finite state machines may provide better performance thanrule based implementations. This may be due to the fact that, unlikerules-based implementations, finite state machines do not need toidentify particular rules prior to enabling particular actions.Moreover, development of finite state machines may be simpler becausefinite state machines do not require sophisticated discriminationnetwork algorithms.

FIG. 6 is a block diagram illustrating exemplary details of chainassembly module 112. As illustrated in the example of FIG. 6, a requestarbitration module 120 in chain assembly module 112 may receive arequest from governance infrastructure 104 to assemble a resource chainto provide a particular top-level service. Chain assembly module 112arbitrates requests in order to ensure that requests for higher-priorityservices are processed before requests for lower-priority services. Forinstance, when request arbitration module 120 receives the request forthe service, request arbitration module 112 may access servicedefinition repository 110 to retrieve a service definition object of theservice. Request arbitration module 112 may then determine whether theservice definition object specifies a priority parameter. If the servicedefinition object specifies a priority parameter, the value of thepriority parameter is the priority of the request. Otherwise, if theservice definition object does not specify a priority parameter, requestarbitration module 112 may treat the request as having the lowestpossible priority.

After determining the priority of the request, request arbitrationmodule 120 may determine whether the request has a higher priority levelthan a current priority level. If the request has a higher prioritylevel than the current priority level, request arbitration module 120may set the current priority level to the priority level of the requestand may send the request to a service matching module 124 in order tobegin processing the request. If the request has a priority level thatis equal to the current priority level, request arbitration module 120may send the request to service matching module 124 in order to beginprocessing the request. Otherwise, if the request has lower prioritythan the current priority level, request arbitration module 120 may addthe request to a request arbitration queue 122.

When a resource start module 138 indicates to request arbitration module120 that the modules of chain assembly module 112 have finishedprocessing a request, request arbitration module 120 may determinewhether a priority level of request that is currently being processed isgreater than a highest-priority request in request arbitration queue122. If there is a request that is currently being processed that hashigher priority than the highest-priority request in request arbitrationqueue 122, request arbitration module 120 may not perform any action.However, if the highest-priority request in request arbitration queue122 is has a higher priority than a request that is currently beingprocessed or has equal priority as a request that is currently beingprocessed, request arbitration module 120 may set the current prioritylevel to the level of the highest-priority request in requestarbitration queue 122. In addition, request arbitration module 120 maysend this highest-priority request in request arbitration queue 122 toservice matching module 124 to begin processing and may remove thishighest-priority request from request arbitration queue 122.

When service matching module 124 receives a request for a particulartop-level service from request arbitration module 120, service matchingmodule 124 may identify one or more service chains that includetop-level service. As discussed above, a “chain” is a set of elementsordered by a dependency relation. A service chain is a “chain”containing services as elements, and is ordered by the relation“resources associated with a first service can interpret resourcesassociated with a second service.”

In order to identify service chains that include the top-level service,service matching module 124 may retrieve a service definition object ofthe top-level service from service definition repository 110. In orderto implement this operation, service matching module 124 may employ anexample recursive operation discussed in detail with regards to FIG. 8below. After service matching module 124 identifies the set of servicechains, service matching module 124 may provide these service chains toa resource chain identification module 126.

When resource chain identification module 126 receives a set of servicechains, resource chain identification module 126 may identify one ormore candidate resource chains for each of the service chains. Asdiscussed above, a resource chain is a “chain” containing resources aselements, and is ordered by the relation “a first resource interprets asecond resource.” In order to identify candidate resource chains for theservice chains, resource chain identification module 126 may use theexample operations discussed in detail with regards to FIGS. 7 and 8below. Some resources may be created as required. For instance, a copyof a software application may be created as required. The candidateresource chains identified by resource chain identification module 126may include resources that have not yet been created. After resourcechain identification module 126 identifies a set of candidate resourcechains, resource chain identification module 126 may provide thesecandidate resource chains to a shareability analysis module 128.

Shareability analysis module 128 begins a process of sorting outunsuitable candidate resource chains in order to identify a singleresource chain. In particular, shareability analysis module 128 may,identify and discard candidate resource chains that do not meet thesharing requirements for the services with which resources in theresource chains are associated. In order to identify and discard suchcandidate resource chains, shareability analysis module 128 may, foreach resource in the candidate resource chains, identify a service withwhich the resource is associated. Shareability analysis module 128 maythen retrieve from service definition repository 110 service definitionobjects of the identified services. Next, for each of the retrievedservice definition objects, shareability analysis module 128 maydetermine whether the service definition object specifies a sharingparameter. If a service definition object of a service specifies a“deny” sharing parameter, shareability analysis module 128 may discardall candidate resource chains that include resources associated with theservice in which a single resource interprets two or more resources. Ifa service definition of a service specifies a “below” sharing parameter,shareability analysis module 128 may discard all candidate resourcechains that include a resource associated with the service in which twoor more resources are interpreted by the resource associated with theservice. If a service definition object of a service specifies an“allow” sharing parameter, shareability analysis module 128 does notdiscard any candidate resource chains due to this service definitionobject. If a service definition object does not specify a sharingparameter, shareability analysis module 128 does not discard anycandidate resource chains due to this service definition object. Aftershareability analysis module 128 applies this shareability analysis witheach of the identified service definition objects, shareability analysismodule 128 may provide the remaining candidate resource chains to apriority analysis module 130

When priority analysis module 130 receives a set of candidate resourcechains, priority analysis module 130 identifies and discards candidateresource chains that would, if actually assembled, harvest resourcesaway from resource chains that provide higher-priority services. Inorder to identify and discard such candidate resource chains, priorityanalysis module 130 may retrieve from service definition repository 110a service definition object of the requested top-level service of thecandidate resource chains. In addition, priority analysis module 130 mayretrieve from resource configuration repository 118 resource statusinformation about whether each of the resources is currently in anexisting resource chain. For each resource that is currently in anexisting resource chain, priority analysis module 130 may retrieve fromservice definition repository 110 service definition objects oftop-level services of the existing resource chains. Priority analysismodule 130 may then determine whether any of the service definitionobjects of the top-level services of the existing resource chainsspecify a priority parameter that is greater than a priority parameterspecified by the service definition object of the requested top-levelservice. If a service definition object of a top-level service of one ofthe existing resource chains specifies a priority parameter that isgreater than the priority parameter specified by the service definitionobject of the requested top-level service, priority analysis module 130may discard the candidate resource chains that include these resources,unless these resources can be shared. After priority analysis module 130applies this priority analysis to each of the candidate resource chains,priority analysis module 130 may provide the remaining candidateresource chains to a resource constraint module 132.

When resource constraint module 132 receives a set of candidate resourcechains, resource constraint module 132 may identify and discardcandidate resource chains that do not satisfy deployment constraints. Inorder to identify and discard candidate resource chains that do notsatisfy deployment constraints, resource constraint module 132 may usethe exemplary operation described below in regards to FIG. 11. Afterdiscarding candidate resource chains that do not satisfy deploymentconstraints, resource constraint module 132 may provide the remainingcandidate resource chains to a cost analysis module 134.

When cost analysis module 134 receives a set of candidate resourcechains, cost analysis module 134 may select the one of the candidateresource chains has the lowest assembly cost. In order to determinewhich one of the candidate resource chains has the lowest assembly cost,cost analysis module 134 may sort the candidate resource chainsaccording to harvest cost, asset cost, and excess feature costs. Harvestcost is a cost associated with harvesting a resource from an existingresource chain. Asset cost is a cost associated with leftover assetsused in a candidate resource chain. For example, a first resource in acandidate resource chain may interpret a second resource in thecandidate resource chain. In this example, a second resource in a chainmay consume 60% of an asset provided by the first resource. Thus, theremaining 40% of the asset provided by the first resource may be“wasted” because the second resource does not take full advantage of theasset provided by the first resource. Excess feature cost is associatedwith a percentage of attributes imported by a first resource in acandidate resource chain that are not imported by a second resource inthe candidate resource chain. Cost analysis module 134 may utilize theexemplary operations in FIGS. 12 and 13 to perform this cost analysis.After identifying the one of the candidate resource chains that has thelowest assembly cost, cost analysis module 134 may provide theidentified candidate resource chain to a resource reservation module 136as the identified resource chain.

When resource reservation module 136 receives a resource chain, resourcereservation module 136 may update asset consumption values of resourcesin the resource chain and then reserve the resources in the resourcechain. In order to update asset consumption values of resources in theresource chain and then reserve the resources in the resource chain,resource reservation module 136 may use the operation described withregard to FIG. 14, below.

When resource reservation module 136 reserves a resource, resourcereservation module 136 may output one or more events to the one ofresource governors 434 that governs the resource. For instance, if theresource currently has a status of “allocated,” resource reservationmodule 136 may output a “harvest” event to the resource governor becauseit may be necessary to harvest the resource in order to use the resourcein the resource chain. If the resource currently has a status of“unallocated,” resource reservation module 136 may output an “allocate”event to the resource governor. If the resource currently has a statusof “stopped,” “failed,” “failed to stop,” or “failed to start,” resourcereservation module 136 may output an “unallocate” event to the resourcegovernor followed by an “allocate” event.

Furthermore, when resource reservation module 136 reserves resources ina resource chain, resource reservation module 136 may configure ones ofresource governors 434 that govern the resources to act as a chain ofresource governors. For example, a first resource governor may govern afirst resource in the resource chain and a second resource governor maygovern a second resource in the resource chain, the first resource mayprovide a service to the second resource. In this example, resourcereservation module 136 may configure the first resource governor toreceive events propagated by the second resource governor and mayconfigure the second resource governor to subscribe to events publishedby the first resource governor.

After updating asset consumption values of resources in the resourcechain and reserving the resources in the resource chain, resourcereservation module 136 may cause resource start module 138 to start thetop resource of the resource chain.

FIG. 7 is a flowchart illustrating an exemplary high-level operation ofchain assembly module 112. Initially, chain assembly module 112 receivesa request to assemble a resource chain that provides a particulartop-level service (150). When chain assembly module 112 receives thisrequest, request arbitration module 120 may arbitrate the request inorder to ensure that requests associated with higher-priority servicesare processed first (152).

After request arbitration module 120 determines that the request may beprocessed, service matching module 124 may identify a set of servicechains that provide the requested service (154). Resource chainidentification module 126 may then identify one or more resource chainsfor each of the service chains identified by service matching module 124(156).

When resource chain identification module 126 identifies the resourcechains, resource chain identification module 126 may provide theresource chains to shareability analysis module 128. Shareabilityanalysis module 128 may then apply a shareability analysis to each ofthe resource chains (158). When shareability analysis module 128 appliesa shareability analysis to the resource chains, shareability analysismodule 128 may discard resource chains that do not satisfy theshareability requirements of the requested service.

Next, priority analysis module 130 may apply a priority analysis to theremaining resource chains (160). When priority analysis module 130applies a priority analysis to the resource chains, priority analysismodule 130 may discard chains that include resources in existingresource chains that cannot be harvested because the existing resourcechains provide a top-level service with higher priority than therequested service.

Resource constraint module 132 may then apply constraints to theremaining resource chains (162). After resource constraint module 132applies constraints to the remaining resource chains, cost analysismodule 134 may identify a single one of the remaining resource chainsthat has a lowest assembly cost (164). When cost analysis module 134identifies the resource chain that has the lowest assembly cost,resource reservation module 136 may reserve the resources of thisresource chain (166). Resource start module 138 may then instruct thetop-level resource of the resource chain to start operating and mayinform request arbitration module 120 that the resource chain assemblyoperation is complete (168).

FIG. 8 is a flowchart illustrating an exemplary operation of servicematching module 124. Initially, service matching module 124 may receivea request to identify service chains for a particular service (180).When service matching module 124 receives this request, service matchingmodule 124 may retrieve from service definition repository 110 a servicedefinition object (abbreviated S.D.O. in FIG. 8) of the requestedservice (182). After retrieving the service definition object of therequested service, service matching module 124 may determine whether theservice definition object specifies that resources associated with therequested service import any facilities (184).

If service matching module 124 determines that the service definitionobject specifies that resources associated with the requested serviceimport one or more facilities (“YES” of 184), service matching module124 may determine whether service matching module 124 has alreadyscanned all other service definition objects in service definitionrepository 110 (186). If service matching module 124 has not alreadyscanned all of the other service definition objects in servicedefinition repository 110 (“NO” of 186), service matching module 124 mayretrieve a new unscanned service definition object from servicedefinition repository 110 (188). Next, service matching module 124 maydetermine whether the new service definition object exports a facilitythat the requested facility imports (190). If the new service definitionobject does not export any facility that is imported by the requestedservice (“NO” of 190), service matching module 124 may loop back andagain determine whether service matching module 124 has scanned allother service definition objects in service definition repository 110(186).

On the other hand, if the new service definition object exports one ormore facilities that are imported by the requested service (“YES” of190), service matching module 124 may request service chains for theservice defined by the new service definition object (192). This may bea recursive method invocation. Thus, a new operation may begin at step(180) with the service defined by the new service definition object asthe requested service. After requesting the service chains for theservice defined by the new service definition object, service matchingmodule 124 may add the service chains to a set of service chains (194).Service matching module 124 may then loop back and again determinewhether service matching module 124 has scanned every service definitionobject in service definition repository 110 (186).

If the requested service does not import any facilities (“NO” of 184) orif service matching module 124 has scanned every service definitionobject in service definition repository 110 (“YES” of 186), servicematching module 124 may discard service chains that do not provide allof the facilities that the requested service provides (196). Forexample, the requested service may import “attribute (A)” and “attribute(B)”. In this example, if resources associated with a first service atthe top of a first service chain export “attribute (A)” and “attribute(B)”, service matching module 124 does not discard the first servicechain. Furthermore, if resources associated with a second service at thetop of a second service chain export “attribute (A)” and resourceassociated with a third service in the second service chain export“attribute (B)”, service matching module 124 does not discard theservice chain because facilities exported by lower-level services in aservice chain are generally available to all resources associated withall services above the lower-level service. In other words, a servicegenerally exports all facilities exported by resources associated withlower-level services. However, if the service definition object of thesecond service specifies that “attribute (B)” is blocked, then thesecond service does not export “attribute (B)”. For this reason, servicematching module 124 may discard this service chain.

After discarding service chains that do not export all facilitiesimported by the requested service, service matching module 124 may addthe current service to the top of each of the remaining service chains(198). Service matching module 124 may then return the service chains(200).

FIG. 9 is a flowchart illustrating an exemplary operation of resourcechain identification module 126. Initially, resource chainidentification module 126 may receive a set of service chains fromservice matching module 124 (210). After receiving the set of servicechains, resource chain identification module 126 may add each of theservice chains to a queue (212). Resource chain identification module126 may then determine whether the queue is empty (214).

If the queue is not empty (“NO” of 214), resource chain identificationmodule 126 may remove a first service chain from the queue (216). Next,resource chain identification module 126 may identify a set of resourcechains for the first service chain (218). An example operation by whichresource chain identification module 126 identifies a set of resourcechains for a service chain is describe with regard to FIG. 10, below.After identifying a set of resource chains for the first service chain,resource chain identification module 126 may add each of these resourcechains to a set of resource chains (220). Resource chain identificationmodule 126 may then loop back and again determine whether the queue isempty (214).

If the queue is empty (“YES” of 214), resource chain identificationmodule 126 may return the set of resource chains (222). For example,resource chain identification module 126 may provide the set of resourcechains to shareability analysis module 126.

FIG. 10 is a flowchart that illustrates an example operation by whichresource chain identification module 126 may identify a set of resourcechains for a service chain. Initially, resource chain identificationmodule 126 may set a current service indicator to indicate the topservice in the service chain (230). Next, resource chain identificationmodule 126 may determine whether resource chain identification module126 has identified all currently existing resources of the currentservice (i.e., the service indicated by the current service indicator)(232).

If resource chain identification module 126 has not identified allcurrently existing resources of the current service (“NO” of 232),resource chain identification module 126 may identify an existingresource of the current service (234). In order to identify an existingresource, resource chain identification module 126 may access resourcestatus data stored in resource configuration repository 118. Asdescribed below, cost analysis module 134 may take other statuses ofresources into account when calculating costs associated with variousresource chains. For instance, because it may be time consuming to stopa resource that is currently operating, a resource chain that includes aresource that has a status of “started” may be more costly than aresource chain that includes a resource that has a status of“available.”

After identifying an existing resource, resource chain identificationmodule 126 may then add the identified resource to a set of resourcesfor the current service (236). Resource chain identification module 126may then loop back and again determine whether resource chainidentification module 126 has identified all existing resources of thecurrent service (232). In this way, resource chain identification module126 adds currently existing resources to a set of resources associatedwith the current service.

If resource chain identification module 126 has identified all currentlyexisting resources of the current service (“YES” of 232), resource chainidentification module 126 may determine whether the current service hasthe capacity to create one or more new resources (238). For instance, aservice action module associated with the current service may provide amethod “hasResourceCapacity ( )” that, when invoked, returns whether newresources can be created for the current service. If the current servicehas the capacity to create one or more new resources (“YES” of 238),resource chain identification module 126 may add a “proxy” resource tothe set of resources for the current service (240). Resource chainidentification module 126 does not, at this point, actually create this“proxy” resource. Rather, this resource is a “proxy” resource because itstands in place of a resource that has yet to be created.

After resource chain identification module 126 adds the “proxy” resourceto the set of resources for the current service or after resource chainidentification module 126 determines that the current service has nocapacity to create a new resource (“NO” of 238), resource chainidentification module 126 may determine whether the current service isthe last service in the service chain (242).

If the current service is not the last service in the service chain(“NO” of 242), resource chain identification module 126 may set thecurrent service indicator to the service in the service chain thatinterprets the service indicated by the current service indicator (i.e.,next lower service in the service chain) (248). Resource chainidentification module 126 may then loop back and again determine whetherresource chain identification module 126 has identified all existingresources of the new current service (232). In this way, resource chainidentification module 126 constructs a set of resources for each servicein the service chain.

If the current service is the last service in the service chain (“YES”of 242), resource chain identification module 126 may identify allcombinations of resources in which one resource is selected from each ofthe sets of resources (246). For example, the service chain may includea first service, a second service, and a third service. In this example,resource chain identification module 126 may have identified resources Aand B for the first service, resources C and D for the second service,and resources E and F for the third service. Using these resources,resource chain identification module 126 may identify the followingcombinations of resources: A-C-E, A-C-F, A-D-E, A-D-F, B-C-E, B-C-F,B-D-E, and B-D-F. After identifying the combinations of resources,resource chain identification module 126 may return these combinationsof resources as resource chains (246).

FIG. 11 is a flowchart illustrating an exemplary operation of resourceconstraint module 132. Initially, resource constraint module 132 mayreceive a request to perform a constraint analysis on a set of resourcechains (260). When resource constraint module 132 receives this request,resource constraint module 132 may add each of the resource chains to afirst queue (262). Resource constraint module 132 may then determinewhether the first queue is empty (264).

If resource constraint module 132 determines that the first queue is notempty (“NO” of 264), resource constraint module 132 may remove a firstresource chain from the first queue (266). Next, resource constraintmodule 132 may add each resource in the first resource chain to a secondqueue (268). Resource constraint module 132 may then determine whetherthe second queue is empty (270).

If resource constraint module 132 determines that the second queue isnot empty (“NO” of 270), resource constraint module 132 may remove afirst resource from the second queue (272). Next, resource constraintmodule 132 may retrieve from service definition repository 110 a servicedefinition object of a service with which the first resource isassociated (274). Resource constraint module 132 may parse the retrievedservice definition object and add each of the constraints specified bythe retrieved service definition object to a third queue (276). Inaddition, resource constraint module 132 may add to the third queueassetConsumption parameters specified in the retrieved servicedefinition object. Resource constraint module 132 may add theassetConsumption parameters because assetConsumption parameters may actas implicit constraints. Resource constraint module 132 may thendetermine whether the third queue is empty (278).

If the third queue is not empty (“NO” of 278), resource constraintmodule 132 may remove a first constraint from the third queue (280).Resource constraint module 132 may then query the resources below thefirst resource according to the first constraint (282). For example, thefirst constraint may specify “collage/base:physicalMemory >=6.0”. Inthis example, resource constraint module 132 may identify a resource inthe first resource chain that exports the asset“collage/base:physicalMemory”. Resource constraint module 132 may theninvoke a method of a resource governor associated with the identifiedresource (e.g., “double getAsset (“physicalMemory”)”). This method mayreturn a value that resource constraint module 132 may then evaluatewith the expression in the first constraint. After resource constraintmodule 132 queries the resources below the first resource according tothe first constraint, resource constraint module 132 may use a responseto the query to determine whether the first constraint is satisfied(290).

If the first constraint is not satisfied (“NO” of 290), resourceconstraint module 132 may empty the second queue and the queue (292).Resource constraint module 132 may then discard the first resource chainbecause a constraint of the first resource chain is not satisfied (294).Next, resource constraint module 132 may loop back and determine whetherthe first queue is empty (264). If the first constraint is satisfied(“YES” of 290), resource constraint module 132 may loop back and againdetermine whether the third queue is empty (278). In this way, resourceconstraint module 132 determines whether all of the constraints of thefirst resource are satisfied.

If resource constraint module 132 determines that the third queue isempty (“YES” of 278), resource constraint module 132 may loop back andagain determine whether the second queue is empty (270). If resourceconstraint module 132 determines that the second queue is empty (“YES”of 270), resource constraint module 132 may add the first resource chainto a set of constraint-satisfied resource chains (296). After adding thefirst resource chain to the set of constraint-satisfied resource chains,resource constraint module 132 may loop back and again determine whetherthe first queue is empty (264). If the first queue is empty (“YES” of264), resource constraint module 132 may return the set ofconstraint-satisfied resource chains (298).

FIG. 12 is a flowchart illustrating an exemplary operation of costanalysis module 134. Initially, cost analysis module 134 receives arequest to perform a cost analysis on a set of resource chains (310).When cost analysis module 134 receives this request, cost analysismodule 134 may calculate a harvest cost for each of the resource chains(312). As discussed above, harvest cost is a cost associated withharvesting a resource from an existing resource chain. An exemplaryoperation by which cost analysis module 134 may calculate a harvest costfor each of the resource chains is provided below with regard to FIG.13. After calculating a harvest cost for each of the resource chains,cost analysis module 134 may discard any resource chains that haveharvest costs that are greater than the lowest calculated harvest cost(314). Cost analysis module 134 may then determine whether only a singleresource chain remains after cost analysis module 134 has discarded theresource chains that have harvest costs that are greater than the lowestcalculated harvest cost (316). If only a single resource chain remains(“YES” of 316) cost analysis module 134 may output this remainingresource chain (318).

On the other hand, if more than one resource chain remains after costanalysis module 134 has discarded the resource chains that have harvestcosts that are greater than the lowest calculated harvest cost (“NO” of316), cost analysis module 134 may calculate asset costs for theremaining resource chains (320). Asset cost is a cost associated withleftover assets used in a resource chain. After calculating an assetcost for each of the resource chains, cost analysis module 134 maydiscard any resource chains that have asset costs that are greater thanthe lowest calculated asset cost (322). Cost analysis module 134 maythen determine whether only a single resource chain remains after costanalysis module 134 has discarded the resource chains that have assetcosts that are greater than the lowest calculated asset cost (324). Ifonly a single resource chain remains (“YES” of 324), cost analysismodule 134 may output this remaining resource chain (318).

If more than one resource chain remains after cost analysis module 134has discarded the resource chains that have harvest costs that aregreater than the lowest calculated harvest cost (“NO” of 324), costanalysis module 134 may calculate excess feature costs for the remainingresource chains (326). Excess feature cost is associated with apercentage of attributes imported by a first resource in a resourcechain that are not imported by a second resource in the resource chain.After calculating an excess feature cost for each of the resourcechains, cost analysis module 134 may discard any resource chains thathave excess feature costs that are greater than the lowest calculatedexcess feature cost (328). Cost analysis module 134 may then determinewhether only a single resource chain remains after cost analysis module134 has discarded the resource chains that have excess feature coststhat are greater than the lowest calculated excess feature cost (330).If only a single resource chain remains (“YES” of 330), cost analysismodule 134 may output this remaining resource chain (318).

If more than one resource chain remains after cost analysis module 134has discarded the resource chains that have excess feature costs thatare greater than the lowest calculated excess feature cost (“NO” of330), cost analysis module 134 may select a first one of the remainingresource chains (332). Next, cost analysis module 134 may discard allresource chains other than the selected resource chain (334). Costanalysis module 134 may then output this remaining resource chain (318).

FIG. 13 is a flowchart illustrating an exemplary operation of costanalysis module 134 to calculate harvest costs for a set of resourcechains. Initially, cost analysis module 134 may add each of the resourcechains to a first queue (340). Next, cost analysis module 134 maydetermine whether the first queue is empty (342). If the first queue isnot empty (“NO” of 342), cost analysis module 134 may remove a firstresource chain from the first queue (344). Cost analysis module 134 maythen add each resource in the first resource chain to a second queue(346). After adding each resource in the first resource chain to thesecond queue, cost analysis module 134 may determine whether the secondqueue is empty (348).

If the second queue is not empty (“NO” of 348), cost analysis module 134may remove a first resource from the second queue (350). After removingthe first resource from the second queue, cost analysis module 134 maydetermine whether the first resource is already in an existing resourcechain (352). Cost analysis module 134 may use resource statusinformation stored in resource configuration module 118 to determinewhether the resource is already in an existing resource chain. Forinstance, if a resource has a status of “started,” “allocated,” or“stopped”, the resource is already in an existing resource chain. Ifcost analysis module 134 determines that the first resource is notalready in an existing resource chain (“NO” of 352), there is no harvestcost for using the first resource. For this reason, cost analysis module134 may loop back and again determine whether the second queue is empty(348).

On the other hand, if cost analysis module 134 determines that the firstresource is in an existing resource chain (“YES” of 352), cost analysismodule 134 may determine whether the first resource can be shared withthe existing resource chain (354). For example, to determine whether thefirst resource can be shared with the existing resource chain, costanalysis module 134 may determine whether each resource in the existingresource chain below the first resource is the same as each resource inthe first resource chain below the first resource. If this is true, costanalysis module 134 may analyze whether sharing parameters of serviceswith which the resource in the existing resource chain are associatedallow such a sharing. If each resource in the existing resource chainbelow the first resource is not the same as each resource in the firstresource chain below the first resource or sharing parameters ofservices with which the resource in the existing resource chain areassociated do not allow such a sharing, the first resource would have tobe harvested in order for the first resource to be used in the firstresource chain. If cost analysis module 134 determines that the firstresource can be shared (“YES” of 354), there is no harvest costassociated with the first resource. For this reason, cost analysismodule 134 may loop back and again determine whether the second queue isempty (348).

If cost analysis module 134 determines that the first resource cannot beshared (“NO” of 354), the first resource would have to be harvested inorder to use the first resource chain. Therefore, there may be a harvestcost associated with the first resource. To calculate the harvest costassociated with the first resource, cost analysis module 134 may add toa harvest cost associated with the first resource a number of fluxresources in the existing resource chain (356). For example, the firstresource may be an interpreting resource in the middle of the existingresource chain and the existing resource chain may support three fluxresources. Thus, by harvesting the first resource, operations of thesethree flux resources would have to cease. In this example, cost analysismodule 134 may add a different value depending on the status of thefirst resource. For instance, if the first resource has a status of“allocated” or “stopped”, the first resource has not yet startedoperating or has stopped operating without error. Consequently, it maybe comparatively cheap to harvest the first resource and deallocatedependent resources. For this reason, cost analysis module 134 may add“3” to the harvest cost associated with the first resource. However, ifthe first resource has a status of “started”, the first resource hasstarted operating. Because it may be time consuming to start resourcesthat have already started, it may be comparatively expensive to harvestthe first resource and deallocate dependent resources. For this reason,cost analysis module 134 may add “6” to the harvest cost associated withthe first resource.

Next, cost analysis module 134 adds a value to the harvest costassociated with the first resource that accounts for costs associatedwith restoring minimum levels of services that would be disrupted byharvesting the first resource (358). For example, cost analysis module134 may identify the services of each of the flux resources in theexisting resource chain. Cost analysis module 134 may then identify aminimum numbers of resources to operate in distributed computing system2 for each of the services (e.g., by reading the SLA min parameters inthe service definition objects of these services). Cost analysis module134 may then, for each of the services, determine the number ofresources that would be required to restore distributed computing system2 to the minimum number of resource for the service if the firstresource were to be harvested. Cost analysis module 134 may add thesenumbers to the harvest cost associated with the first resource. Costanalysis 134 may then loop back and again determine whether the secondqueue is empty (348).

If cost analysis module 134 determines that the second queue is empty(“YES” of 348), cost analysis module 134 may sum up the harvest costsassociated with each of the resources in the first resource chain inorder to calculate a harvest cost for the first resource chain (360).Cost analysis module 134 may then loop back and determine whether thefirst queue is empty (342). If the first queue is empty (“YES” of 342),cost analysis module 134 may return the harvest costs of the resourcechains (362).

FIG. 14 is a flowchart illustrating an exemplary operation of resourcereservation module 136. Initially, resource reservation module 136 mayadd each resource in a resource chain to a first queue (370). Whenresource reservation module 136 adds the resources to the first queue,resource reservation module 136 may add the resources in such a way thatthe top-most resource is at the front of the queue. After adding theresources to the first queue, resource reservation module 136 maydetermine whether the first queue is empty (372).

If the first queue is not empty (“NO” of 372), resource reservationmodule 136 may remove a first resource from the first queue (374).Resource reservation module 136 may then determine whether the firstresource provides an asset specified in an asset consumption vector(376). The asset consumption vector may be a data structure that maystore asset consumption totals for various assets.

If the first resource provides an asset in the asset consumption vector(“YES” of 376), resource reservation module 136 may update the remainingasset amount for the asset in the first resource (378). For example, thefirst resource may provide the asset “collage/base:physicalMemory” andthe asset consumption vector may include the value “16” for the asset“collage/base:physicalmemory”. In this example, resource reservationmodule 136 applies a “consumeAsset” method. Typically, the“consumeAsset” method subtracts the value “16” from the asset“collage/base:physicalMemory”. Thus, if the first resource originallyhad “40” of asset “collage/base:physicalmemory” remaining, the firstresource now has “24” of the asset “collage/base:physicalMemory”remaining. After updating the remaining asset amount, resourcereservation module 136 may remove the asset from the asset consumptionvector (380). Next, resource reservation module 136 may loop back andagain determine whether the asset consumption vector includes any assetthat are provided by the first resource (376).

If the asset consumption vector does not include any assets provided bythe first resource (“NO” of 376), resource reservation module 136 mayadd each asset consumed by the first resource to a second queue (382).Resource reservation module 136 may then determine whether the secondqueue is empty (384).

If the second queue is not empty (“NO” of 384), resource reservationmodule 136 may remove a first asset from the second queue (386).Resource reservation module 136 may then determine how much the firstresource consumes of the first asset (388). Resource reservation module136 may determine how much the first resource consumes of the firstasset by invoking a method of the resource action module associated withthe first resource. After determining how much the first resourceconsumes of the first asset, resource reservation module 136 maydetermine whether there is an entry in the asset consumption vector forthe first asset (390).

If there is not an entry in the asset consumption vector for the firstasset (“NO” of 390), resource reservation module 136 may add the assetand the amount consumed to the asset consumption vector (392). Afteradding the asset and the amount consumed to the asset consumptionvector, resource reservation module 136 may reserve the first resource(394). Resource reservation module 136 may then loop back and determinewhether the second queue is empty (384).

On the other hand if there is already and entry in the asset consumptionvector for the first asset (“YES” of 390), resource reservation module136 may add the amount consumed to the amount consumed specified by thisentry (396). After adding the amount consumed to entry in the assetconsumption vector, resource reservation module 136 may reserve thefirst resource (394). Resource reservation module 136 may then loop backand determine whether the second queue is empty (384).

If the second queue is empty (“YES” of 384), resource reservation module136 may loop back and again determine whether the first queue is empty(372). If the first queue is empty (“YES” of 372), resource reservationmodule 136 may cause resource start module 138 to start the top-levelresource of the resource chain (398).

FIG. 15 is a block diagram illustrating an exemplary finite statemachine that implements the functionality of a service governor 450.Service governor 450 includes fourteen states and sixty-six transitions.For purposes of clarity, the labels on the transitions have been omittedfrom FIG. 15. Furthermore, if service governor 450 receives an event forwhich this disclosure provides no description, it may be assumed that anerror has occurred.

A “start” state 452 is an initial state of service governor 450. Servicegovernor 450 transitions from “start” state 452 to an “inactive” state454 when service governor 450 receives a “ServiceConfigured” serviceevent. Service governor 450 may transition to several states from“inactive” state 454.

Service governor 450 transitions from “inactive” state 454 to an“interpreting” state 456 when service governor 450 receives an “activateinterpretation” event from administrative interface module 108. Whenservice governor 450 performs this transition, service governor 450 setsa “findable” variable to “true.” When the value “findable” variable ofservice governor 450 is true, chain assembly module 112 may include theservice governed by service governor 450 in service chains.

When service governor 450 is in “interpreting” state 456, servicegovernor 450 may transition to a “cloaked” state 458 when servicegovernor 450 receives a “cloak” event from administrative interfacemodule 108. When service governor 450 performs this transition, servicegovernor 450 sets the “findable” variable of the software object thatrepresents service governor 450 to “false.” When the value of “findable”variable of service governor 450 is false, chain assembly module 112 maynot include the service governed by service governor 450 in servicechains.

In addition, when service governor 450 is in “interpreting” state 456,service governor 450 may perform a transition back to “interpreting”state 456 when service governor 450 receives a “resource stopped” event,a “resource started” event, or a “resource failed” event from a resourcegovernor of the service governed by service governor 450. In addition,service governor 450 may perform a transition back to “interpreting”state 456 when service governor 450 receives a “recover” event fromcontrol node 6 when control node 6 restarts after a failure. Whenservice governor 450 is in “interpreting” state 456 and receives a“resource stopped” event, service governor 450 may invoke the“deallocate” method of the resource governor to deallocate (i.e., toremove the resource from a resource chain) the resource that generatedthe “resource stopped” event. In addition, service governor 450 mayinvoke the “resourceStopped” method of the service action module toindicate that the resource that generated the “resource stopped” eventhas stopped. A resource may generate a “resource stopped” event when aresource of the service governed by service governor 450 has stopped.When service governor 450 is in “interpreting” state 456 and receives a“resource started” event from a resource governor of a resource, servicegovernor 450 may invoke the “resourceStarted” method of the serviceaction module to record in resource configuration repository 118 thatthe resource has started. As discussed above, chain assembly module 112may use the resource configuration information in resourcesconfiguration repository 118 when identifying resource chains. Whenservice governor 450 is in “interpreting” state 456 and receives a“resource failed” event from a resource governor of a resource, servicegovernor 450 may invoke the “deallocate” method of the resource governorin order to deallocate this resource from its current resource chain. Inaddition, service governor 450 may invoke the “resource failed” methodof the service action module in order to record in resourceconfiguration repository 118 that the resource has failed. A resourcegovernor may generate a “resource failed” event when the resource hasfailed.

When service governor 450 receives a “recover” event, service governor450 may invoke the “replay” method to generate and receive a new“activate interpretation” event. When service governor 450 receives thenew “activate interpretation” event caused by the “replay” method,service governor 450 handles this event as normal. For instance, ifservice governor 450 is in “inactive” state 454 and receives the“activate interpretation” event, service governor 450 transitions to“interpreting” state 456. If service governor 450 is already in“interpreting” state 456, service governor 450 performs no action.

Service governor 450 may transition from “interpreting” state 456 to a“wait for stop” state 460 when service governor 450 receives a “stop”event from administrative interface module 108. When service governor450 is in “wait for stop” state 460, service governor 450 waits for allresources of the service to stop. The “stop” event amounts to aninstruction from administrator 12 to stop the operation of all instancesof a service. When service governor 450 performs this transition,service governor 450 may invoke the “cloakService” method of thisservice governor in order to prevent chain assembly module 112 fromincluding the service governed by service FSA in any chains of softwareservices. In addition, service governor 450 may invoke“forceStopResource” methods of each of the resource governors thatgovern resource of this service in order to stop all resources of theservice. Service governor 450 may also transition to “wait for stop”state 460 from “cloaked” state 458 when service governor 450 receives a“stop” event. When service governor 450 receives a “stop” event whenservice governor 450 is in “cloaked” state 458, service governor 450 mayinvoke the “forceStopResource” methods of each of the resource governorsthat govern resource of this service in order to stop all resources ofthe service.

When service governor 450 is in “cloaked” state 458, service governor450 may transition back to “cloaked” state 458 when service governor 450receives a “resource stopped” event, a “resource started” event, or a“resource failed” event from a resource governor of the service governedby service governor 450. In addition, service governor 450 maytransition back to “cloaked” state 458 when service governor 450receives a “recover” event. When service governor 450 is in “cloaked”state 458 and receives a “resource stopped” event, service governor 450may invoke the “deallocate” method of the resource governor that governsthe resource that generated the “resource stopped” event and may invokethe “resourceStopped” method of the service action module in order toinform the service that this resource has stopped. A resource governormay generate a “resource stopped” event when a resource of the servicegoverned by service governor 450 has stopped. When service governor 450is in “cloaked” state 458 and receives a “resource started” event,service governor 450 may invoke the “resource Started” method of theservice action module to inform the service that the resource thatgenerated the “resource started” event has started. A resource governorgenerates a “resource started” event when the resource has started. Whenservice governor 450 is in “cloaked” state 458 and receives a “resourcefailed” event, service governor 450 may invoke the “deallocate” methodof the resource governor that governs the resource that generated the“resource failed” event in order to deallocate this resource from itscurrent resource chain. In addition, while performing this transition,service governor 450 may also invoke the “resource Failed” method of theservice action module in order to inform the service that the resourcethat generated the “resource failed” event has failed. A resource maygenerate a “resource failed” event when the resource has failed. Whenservice governor 450 receives a “recover” event while in “cloaked” state458, service governor 450 may invoke the “replay” method of servicegovernor 450 in order to generate and respond to a new “cloak” event.

Service governor 450 may transition from “wait for stop” state 460 backto “wait for stop” state 460 when service governor 450 receives a“recover” event from control node 6. When service governor 450 receivesa “recover” event when in “wait for stop” state 460, service governor450 may again invoke the “forceStopResource” methods of each of resourcegovernors 434 that govern resources of this service in order to stop allresources of the service governed by service governor 450. In addition,service governor 450 may transition from “wait for stop” state 460 backto “wait for stop” state 460 when service governor 450 receives a“resource stopped” event, a “resource started” event, or a “resourcefailed” event from a resource governor that governs a resource of theservice governed by service governor 450. If service governor 450receives a “resource stopped” event while in “wait for stop” state 460,service governor 450 may invoke the “deallocate” method of the resourcegovernor that governs the resource that generated the “resource stopped”event in order to deallocate this resource from its current resourcechain. In addition, service governor 450 may invoke the“resourceStopped” method of the service action module in order to informthe service that the resource that generated the “resource stopped”event has stopped. When service governor 450 receives a “resourcestarted” event while in “wait for stop” state 460, service governor 450may invoke the “stop” method of the resource action module of theresource that generated the “resource started” event in order to causethis resource to stop. When service governor 450 receives a “resourcefailed” event, service governor 450 may invoke the “deal locate” methodof the resource governor that governs the resource that generated the“resource failed” event and may invoke the “resourceFailed” method ofthe service action module in order to inform the service that theresource that generated the “resource failed” event has failed.

Service governor 450 may transition from “wait for stop” state 460 to“inactive” state 454 when all of the resources of the service havestopped. In addition, service governor 450 may transition from “wait forstop” state 460 to “interpreting” state 456 when service governor 450receives an “activate interpretation” event from administrativeinterface module 108. Administrative interface module 108 may generatean “activate interpretation” event when administrator 12 decides toresume the operation of the service after deciding to stop the service.

Service governor 450 may transition from “inactive” state 454 to a“fluxing” state 462 when service governor 450 receives an “activateflux” event from administrative interface module 108. Administrativeinterface module 108 may invoke the “activateFluxService” method ofservice governor 450 in order to generate an “activate flux” event whenadministrator 12 decides to start the operation of the service as a fluxservice. When service governor 450 transitions from “inactive” state 454to “fluxing” state 462, service governor 450 may invoke the“engageFluxService” method of service governor 450 in order to startobeying requests from one of SLA governors 430 to increase or decreasethe capacity of this service. In other words, service governor 450instructs one of SLA governors 430 that the SLA governor may begin todynamically control the capacity of distributed computing system 2 toprovide this service as a top-level (i.e., flux) service. Servicegovernor 450 may transition from “fluxing” state 462 back to “inactive”state 454 when service governor 450 receives a “deactivate flux” eventand there are no active resources of the flux service. Service governor450 may receive a “deactivate flux” event when administrative interfacemodule 108 invokes the “deactivateFluxService” method of servicegovernor 450. When service governor 450 performs this transition from“fluxing” state 462 to “inactive” state 454, service governor 450 mayinvoke the “disengageFluxService” method of service governor 450 inorder to stop obeying requests from SLA governors 430 to increase ordecrease the capacity of this service.

Service governor 450 may transition from “fluxing” state 462 to a“deactivating” state 464 when service governor 450 receives a“deactivate flux” event from administrative interface module 108 andthere are one or more active resources of the flux service. When servicegovernor 450 is in “deactivating” state 464, service governor 450 iswaiting for all resources of the flux service to stop. Service governor450 transitions back to “fluxing” state 462 from “deactivating” state464 when service governor 450 receives an “activate flux” event fromadministrative interface module 108. When service governor 450 performsthis transition back to “fluxing” state 462, service governor 450 mayinvoke the “engageFluxService” method of service governor 450 toreengage dynamic control of the capacity of this service. In addition,when service governor 450 is in “deactivating” state 464, servicegovernor 450 transitions to “inactive” state 454 when there are noremaining started resources of the service.

Service governor 450 may transition from “fluxing” state 462 to a“disengaged” state 466 when service governor 450 receives a “disengage”event from administrative interface module 108. When service governor450 is in “disengaged” state 466, service governor 450 has invoked the“disengageFluxService” method of service governor 450 to disengagedynamic control of the capacity of this service. Because servicegovernor 450 disengages service level automation, service governor 450may ignore any further requests to add or stop resources of the service.Service governor 450 may transition from “disengaged” state 466 to“fluxing” state 462 when service governor 450 receives an “engage” eventfrom administrative interface module 108. When service governor 450performs this transition, service governor 450 may invoke the“engageFluxService” method of service governor 450 in order to reengagedynamic control of the capacity of this service, and consequently beginsobeying subsequent requests to add or stop resources of the service.Furthermore, service governor 450 may transition from “disengaged” state466 to “inactive” state 454 when service governor 450 receives a“deactivate flux” event from administrative interface module 108 andthere are no active resources of the service. When service governor 450performs this transition, service governor 450 may invoke the“disengageFluxService” method of service governor 450 to disengagedynamic control of the capacity of this service. On the other hand,service governor 450 transitions from “disengaged” state 466 to“deactivating” state 464 when service governor 450 receives a“deactivate flux” event from administrative interface module 108 andthere are one or more active resources of the service. When servicegovernor 450 performs this transition from “disengaged” state 466 to“deactivating” state 464, service governor 450 may invoke the“disengageFluxService” method of service governor 450 to disengagedynamic control of the capacity of this service and may invoke the “stopResource” methods of each of resource governors 434 that governresources of this service in order to stop all resources of thisservice.

Service governor 450 may transition from “fluxing” state 462 back to“fluxing” state 462 when service governor 450 receives a UCTH event or aUCTL event from one of SLA governors 430. The acronym “UCTH” stands forUnused Capacity Too High. The acronym “UCTL” stands for Unused CapacityToo Low. When service governor 450 receives a UCTH event while in“fluxing” state 462, service governor 450 may invoke a“deleteFluxResource” method of the service action module to delete aresource of this service. The SLA governor may generate a UCTH eventwhen the SLA governor determines that distributed computing system 2currently has excess capacity to provide this service. When servicegovernor 450 receives a UCTL event while in “fluxing” state 462, servicegovernor 450 may invoke an “addFluxResource” method of the serviceaction module to add a new resource of the flux service. SLA governors430 may generate UCTL events when SLA governors 430 determine thatservice levels of services provided by distributed computing system 2 donot satisfy service-level agreements. In other words, the unusedcapacity of distributed computing system 2 to provide a service is toolow to satisfy a servicelevel agreement.

Service governor 450 may also transition from “fluxing” state 462 backto “fluxing” state 462 when service governor 450 receives a “resourcefailed” event, a “resource available” event, a “resource started” event,a “resource stopped” event, a “resource stop failed” event, or a“resource start failed” event from a resource governor. When servicegovernor 450 is in “fluxing” state 462 and receives a “resource failed”event, service governor 450 may invoke the “deallocate” method of theresource governor that governs the resource that generated the “resourcefailed” event and may invoke the “resourceFailed” method of the serviceaction module to inform the service that this resource has failed. Inaddition, when service governor 450 is in “fluxing” state 462 andreceives a “resource failed” event, service governor 450 may invoke the“publish” method to generate a “resource available” event. A “resourceavailable” may inform service governor 450 that a resource of a servicethat this service requires in order to operate is now available. Whenservice governor 450 receives a “resource available” event servicegovernor 450 may invoke the “resumeUCTL” method of one of SLA governors430 to instruct the SLA governor that the SLA governor may resume addingresources of the flux service. When service governor 450 receives a“resource started” event from a resource, service governor 450 mayinvoke the “resourceStarted” method of the service action module toinform the service that the resource that generated the “resourcestarted” event has started. Similarly, when service governor 450receives a “resource stopped” event, a “resource stop failed” event, ora “resource started failed” event from a resource governor, servicegovernor 450 may invoke the “resourceStopped,” “resourceFailedToStop,”or “resourceFailedToStart” methods of the service action module,respectively. The “resourceStopped” method of the service action moduleand the “resourceFailedToStop” method to inform the service that theresource has stopped and that the resource has failed to stop,respectively.

Service governor 450 may transition from “disengaged” state 466 back to“disengaged” state 466 when service governor 450 receives a “resourcestopped” event, a “resource started” event, or a “resource failed” eventfrom a resource governor that governs a resource of the service governedby service governor 450. When service governor 450 receives a “resourcestopped” event, service governor 450 may invoke the “deallocate” methodof the resource governor and the “resourceStopped” method of the serviceaction module. When service governor 450 receives a “resource started”event, service governor 450 may invoke the “resourceStarted” method ofthe service action module to inform the service that the resource thatgenerated the “resource started” event has started. When servicegovernor 450 receives a “resource failed” event while in “disengaged”state 466, service governor 450 may invoke the “deallocate” method ofthe resource governor, the “resourceFailed” method of the service actionmodule, and the “publish” method to generate a “resource available”event. In addition to the events received from a resource governor,service governor 450 may also receive a “recover” event while in“disengaged” state 466 from control node 6. When service governor 450receives a “recover” event while in “disengaged” state 466, servicegovernor 450 may invoke the “replay” method of service governor 450 togenerate and respond to a new “disengage” event.

Service governor 450 may transition from “deactivating” state 464 backto “deactivating” state 464 when service governor 450 receives a“resource stopped” event, a “resource started” event, or a “resourcefailed” event from a resource governor. When service governor 450receives a “resource stopped” event, service governor 450 may invoke the“deallocate” method of the resource governor and the “resourceStopped”method of the service action module in order to deallocate the resourceand to inform the service that the resource has stopped. When servicegovernor 450 receives a “resource started” event, service governor 450may invoke the “resourceStarted” method of the service action module toinform the service that a resource has started and may then invoke the“forceStopResource” method of the resource governor that governs theresource that generated the “resource started” event in order to forcethat resource to stop. Service governor 450 forces the resource to stopbecause service governor 450 is waiting for flux resources to stop whenservice governor 450 is in “deactivating” state 464. When servicegovernor 450 receives a “resource failed” event while in “deactivating”state 464, service governor 450 may invoke the “deallocate” method ofthe resource governor, the “resourceFailed” method of the service actionmodule, and the “publish” method to generate a “resource available”event. In addition to the events received from a resource governor,service governor 450 may also receive a “recover” event while in“deactivating” state 464. When service governor 450 receives a “recover”event while in “deactivating” state 464, service governor 450 may invokethe “disengageSLA” method of one of SLA governors 430 to prevent the SLAgovernor from attempting to add or stop additional resources of the fluxservice. Service governor 450 may also invoke the “stopResource” methodsof the resource governors of this service in order to stop all resourcesof the flux service.

When service governor 450 is in “inactive” state 454 and receives a“customize” event from administrative interface module 108, servicegovernor 450 transitions to a “waiting to customize” state 468. Servicegovernor 450 may invoke “start” methods of each of the resourcegovernors of this service when performing this transition. The “start”method of a resource governor requests that a resource of the servicestart. While service governor 450 is in “waiting to customize” state468, service governor 450 is waiting for all of the resources of theservice to start. To determine whether all of the resources havestarted, service governor 450 may periodically check whether the numberof resources of the service that have started is equal to the maximumnumber of resources for the service. Service governor 450 may performthis check by invoking the “getResourceCount” method and the“getMaxResourceCount” method and determining whether the values returnedby these methods are equal.

When service governor 450 determines that all of the resources of theservice have started, service governor 450 may transition to a“customizing” state 470. While service governor 450 is in “customizing”state 470, service governor 450 is “customizing” the service. Whileservice governor 450 is in “customizing” state 470, administrator 12 maymanually configure (i.e., customize) each resource of the servicegoverned by service governor 450. For example, administrator 12 mayconfigure each resource of the service governed by service governor 450to communicate with each of the other resources of the service governedby service governor 450. When service governor 450 is in “customizing”state 470, service governor 450 may transition back to “customizing”state 470 when service governor 450 receives a “recover” event fromcontrol node 6.

Service governor 450 may transition to “deactivating” state 464 from“customizing” state 470 when service governor 450 receives a“customization done” event from administrative interface module 108. The“customization done” event may indicate that administrator 12 hasfinished customizing the service. When service governor 450 transitionsfrom “customizing” state 470 to “deactivating” state 464, servicegovernor 450 may invoke the “stopResource” methods of each of theresource governors of this service in order to stop all of the resourcesof the service.

In addition, service governor 450 may transition from “customizing”state 470 to a “wait for customization cancel” state 472 when servicegovernor 450 receives a “customization cancel” event from administrativeinterface module 108. The “customization cancel” event may indicate thatadministrator 12 has decided to cancel an in-progress customizationprocess. When service governor 450 transitions from “customizing” state470 to “wait for customization cancel” state 472, service governor 450may invoke the “forceStopResource” method of each of the resourcegovernors of this service in order to immediately stop all resources ofthe service. While service governor 450 is in “wait for customizationcancel” state 472, service governor 450 is waiting for all resources ofthe service to stop after administrator 12 cancels a customizationprocess.

Service governor 450 may transition from “wait customization cancel”state 472 to a “wait customization delete” state 474 when servicegovernor 450 determines that the number of started resources of theservice is zero. Service governor 450 may determine that the number ofstarted resources of the service is zero by periodically invoking the“getCount” method and determining whether the returned value equalszero. When service governor 450 performs this transition from “waitcustomization cancel” state 472 to “wait customization delete” state474, service governor 450 may invoke the “deleteResource” methods ofeach of the resource governors of this service in order to delete all ofthe resources of the service. While service governor 450 is in “waitcustomization delete” state 474, service governor 450 is waiting for allresources to be deleted after customization.

When service governor 450 is in “wait customization delete” state 474and receives a “recover” event from control node 6, service governor 450may transition back to “wait customization delete” state 474. Duringthis transition, service governor 450 may invoke the “deleteResource”methods of each of the resource governors of this service again toensure that all resources of the service are deleted.

Service governor 450 may transition from “wait customization delete”state 474 to “inactive” state 454 when service governor 450 receives a“resource deleted” event from a resource governor and the number ofresources of the service is zero.

When service governor 450 is in “waiting to customize” state 468,service governor 450 may transition back to “waiting to customize” state468 when service governor 450 receives one of several events. Forinstance, service governor 450 may transition from “waiting tocustomize” state 468 back to “waiting to customize” state 468 whenservice governor 450 receives a “resource failed” event, a “resourcestarted” event, or a “resource stopped” event from a resource governorof the service. When service governor 450 receives a “resource failed”event while in “waiting to customize” state 468, service governor 450may invoke the “resourceFailed” method of the service action module toinform the service that the resource that generated the event has failedand service governor 450 may also invoke the “addResource” method of theservice action module to restart the resource that generated the event.When service governor 450 receives a “resource started” event while in“waiting to customize” state 468, service governor 450 may invoke the“resourceStarted” method of the service action module to inform theservice that the resource that generated the event has started. Whenservice governor 450 receives a “resource stopped” method while in“waiting to customize” state 468, service governor 450 may invoke the“resourceFailed” method of the service action module to inform theservice that the resource that generated the event has failed andservice governor 450 may also invoke the “addResource” method of theservice action module to restart the resource that generated the event.Furthermore, service governor 450 may transition from “waiting tocustomize” state 468 back to “waiting to customize” state 468 whenservice governor 450 receives a “recover” event from control node 6.When service governor 450 receives “recover” event while in “waiting tocustomize” state 468, service governor 450 may invoke the “replay”method to generate a new “customize” event.

When service governor 450 is in “wait customization cancel” state 472,service governor 450 may transition back to “wait customization cancel”state 472 when service governor 450 receives one of several events. Forinstance, service governor 450 may transition from “wait customizationcancel” state 472 back to “wait customization cancel” state 472 whenservice governor 450 receives a “resource failed” event, a “resourcestarted” event, or a “resource stopped” event from a resource governorof the service. When service governor 450 receives a “resource failed”event while in “wait customization cancel” state 472, service governor450 may invoke the “deallocate” method of the resource governor todeallocate the resource that generated the “resource failed” event fromthe node slot and service governor 450 may also invoke the “resourceFailed” method of the service action module to inform the service thatthe resource that generated the “resource failed” event has failed. Whenservice governor 450 receives a “resource stopped” event while in “waitcustomization cancel” state 472, service governor 450 may invoke the“deallocate” method of the resource governor the resource that generatedthe “resource stopped” event and service governor 450 may also invokethe “resourceStopped” method of the service action module to inform theservice that the resource that generated the “resource failed” event hasstopped. When service governor 450 receives a “resource started” eventwhile in “wait customization cancel” state 472, service governor 450 mayinvoke the “forceStopResource” method of the resource governor thatgoverns the resource that generated the “resource started” event tostop. Furthermore, service governor 450 may transition from “waitcustomization cancel” state 472 to “wait customization cancel” state 472when service governor 450 receives a “recover” event from control node6. When service governor 450 performs this transition, service governor450 may invoke the “forceStopResource” methods of each of the resourcegovernors of this service in order to force all resources of the serviceto stop.

Service governor 450 may transition from “inactive” state 454 to a “waitremove delete” state 476 when service governor 450 receives a “remove”event from administrative interface module 108. The “remove” event mayindicate that administrator 12 wants to remove the service fromdistributed computing system 2 altogether. When service governor 450performs this transition, service governor 450 may invoke the“deleteResource” method of each of the resource governors of thisservice in order to delete all resources of the service from distributedcomputing system 2. While service governor 450 is in “wait removedelete” state 476, service governor 450 is waiting for all resources ofthe service to be deleted.

Service governor 450 may perform several transitions from “wait removedelete” state 476. For instance, service governor 450 may transitionfrom “wait remove delete” state 476 back to “wait remove delete” state476 when service governor 450 receives a “recover” event from controlnode 6. When service governor 450 performs this transition, servicegovernor 450 may invoke the “delete Resource” methods of each of theresource governors of this service again to delete all resources of theservice. In addition, service governor 450 may transition from “waitremove delete” state 476 to a “final” state 478 when service governor450 receives a “resource deleted” event from a resource governor and allof the resources of the service have been deleted. When service governor450 performs this transition, service governor 450 may invoke the“resourceDeleteComplete” method of the service action module to informthe service that all resources of the service have been deleted.

FIG. 16 is a block diagram illustrating an exemplary finite statemachine that implements resource governor 500. Resource governor 500includes fifteen states and thirty-nine transitions. For purposes ofclarity, the labels on the transitions have been omitted from FIG. 16.Furthermore, it is also assumed that resource governor 500 governs aresource of a service governed by service governor 450

Initially, resource governor 500 may start in an “unallocated” state502. When resource governor 500 is in “unallocated” state 502, theresource governed by resource governor 500 is available to be allocated.Resource governor 500 may transition from “unallocated” state 500 to an“allocated” state 504 when resource governor 500 receives an “allocate”event from service governor 450. When resource governor 500 performsthis transition, resource governor 500 sets the value of“depTaskCounted” to false, the value of “startChain” to false, the valueof “tasks” to zero, and the value of “destroy” to false. Resourcegovernor 500 may also transition from “unallocated” state 502 to a finalstate 506 when resource governor 500 receives a “destroy” event from aservice governor.

Resource governor 500 may transition from “unallocated” state 502 backto “unallocated” state 502 when resource governor 500 receives a“dependent failed” event from a resource governed by resource governor500. Resource governor 500 may also transition from “unallocated” state502 back to “unallocated” state 502 when resource governor 500 receivesa “recover” event from control node 6. In addition, resource governor500 may transition from “unallocated” state 502 back to “unallocated”state 502 when resources governor 500 receives a “task complete” eventfrom the resource governed by resource governor 500.

When resource governor 500 is in “allocated” state 504, chain assemblymodule 112 has allocated the resource governed by resource governor 500to one or more resource chains. Resource governor 500 may transitionfrom “allocated” state 504 to “unallocated” state 502 when resourcegovernor 500 receives a “stop” event from service governor 450 or ahigher-level resource governor. When resource governor 500 performs thistransition, resource governor 500 may invoke the “processEvent” methodof the service governor for the resource in order to provide the servicegovernor with a “resource start failed” event. Resource governor 500 mayalso transition from “allocated” state 504 to “unallocated” state 502when resource governor 500 receives a “Harvest” event from the servicegovernor. A service governor may generate a “harvest” event when theservice governor invokes the “forceStopResource” method of resourcegovernor 500 in order to stop a resource so that the resource may beused for another purpose. When resource governor 500 performs thistransition, resource governor 500 may invoke the “processEvent” methodof the service governor in order to provide the service governor with a“resource start failed” event.

Resource governor 500 may transition from “allocated” state 504 back to“allocated” state 504 when resource governor 500 receives an “allocate”event from the service governor. In addition, resource governor 500 maytransition from “allocated” state 504 back to “allocated” state 504 whenresource governor 500 receives a “dependent ready” event, a “dependentrunning” event, or a “task complete” event from the resource governed byresource governor 500. Resource governor 500 may also transition from“allocated” state 504 back to “allocated” state 504 when resourcegovernor 500 receives a “recover” event from the service governor. Whenresource governor 500 performs this transition, resource governor 500may invoke the “publish” method to provide a “recover” event tohigher-level resource governors.

Resource governor 500 may transition from “allocated” state 504 to a“getting ready” state 508 when either of two events occur. First,resource governor 500 may transition from “allocated” state 504 to“getting ready” state 508 when resource governor 500 receives a “getready” event from a higher-level resource governor. When resourcegovernor 500 performs this first transition, resource governor 500 setsthe value of “tasks” to 2, and may invoke the “getReady” method of theresource action module to make the resource ready to be started. Inaddition, when resource governor 500 performs this first transition,resource governor 500 may invoke the “propagate” method of the resourcegovernor to provide a “get ready” event to an immediately lower resourcegovernor and to instruct the lower resource governor to reply to the“get ready” event with a “dependent ready” event. Second, resourcegovernor 500 may transition from “allocated” state 504 to “gettingready” state 508 when resource governor 500 receives a “start chain”event from chain assembly module 112. When resource governor 500performs this second transition, resource governor 500 sets the value of“tasks” to 2, sets the value of “startChain” to true, and may invoke the“getReady” method of the resource action module. In addition, whenresource governor 500 performs this second transition, resource governor500 may invoke the “propagate” method of the resource governor toprovide a “get ready” event and a “dependent ready” to the immediatelylower resource governor.

When resource governor 500 is in “getting ready” state 508, the resourceand its dependent resources, if any, are getting ready to run. Resourcegovernor 500 may transition from “getting ready” state 508 back to“getting ready” state 508 when resource governor 500 receives any ofseveral events. For example, resource governor 500 may transition from“getting ready” state 508 back to “getting ready” state 508 whenresource governor 500 receives an “allocate” event, a “get ready” event,a “dependent ready” event, a “dependent running” event, a “taskcomplete” event, or a “stop” event when the number of uses is not zero.In this example, resource governor 500 does not perform any action inresponse to these events. In another example, resource governor 500 maytransition from “getting ready” state 508 back to “getting ready” state508 when resource governor 500 receives a “start chain” event from chainassembly module 112. When resource governor 500 performs thistransition, resource governor 500 sets the value of “startChain” totrue. In addition, resource governor 500 may transition from “gettingready” state 508 back to “getting ready” state 508 when resourcegovernor 500 receives a “dependent ready” event and the value of“depTaskCounted” is not true. When resource governor 500 performs thistransition, resource governor 500 sets the value of “depTaskCounted” totrue and decrements the value of “tasks.” In this way, resource governor500 indicates that a resource dependent on the resource governed byresource governor 500 is ready to run. Resource governor 500 may alsotransition from “getting ready” state 508 back to “getting ready” state508 when resource governor 500 receives an “I am ready” event from theresource governed by resource governor 500. When resource governor 500performs this transition, resource governor 500 decrements the value of“tasks.”

Resource governor 500 may transition from “getting ready” state 508 to a“getting ready failed” state 510 when one of several events occur. Inparticular, resource governor 500 may transition from “getting ready”state 508 to “getting ready failed” state 510 when resource governor 500receives a “dependent failed” event from lower-level resource governor.Furthermore, when resource governor 500 is in “getting ready” state 508and receives a “dependent failed” event when “depTaskCounted” is nottrue, resource governor 500 sets the value of “depTaskCounted” to true,decrements the value of “tasks”, and transitions to “getting readyfailed” state 510. Resource governor 500 may also transition from“getting ready” state 508 to “getting ready failed” state 510 whenresource governor 500 receives a “stop” event from the service governoror the higher-level resource governor when the value returned by the“uses” method is zero. The “uses” method may return a usage count forthe resource governed by resource governor 500. A usage count reflectsthe number of resources that are dependent on the resource governed byresource governor 500. In addition, resource governor 500 transitionsfrom “getting ready” state 508 to “getting ready failed” state 510 whenresource governor 500 receives a “harvest” event from the servicegovernor. When resource governor 500 is in “getting ready” state 508 andreceives an “I failed” event from the resource governed by resourcegovernor 500, resource governor 500 decrements the value of “tasks” andtransitions to “getting ready failed” state 510.

When resource governor 500 is in “getting ready failed” state 510,resource governor 500 may transition to a “complete tasks” state 512when the value of “tasks” equals zero. While in “complete tasks” state512, resource governor 500 completes all outstanding tasks of theresource. When resource governor 500 performs this transition, resourcegovernor 500 sets the value of “restingState” to “startFailed”. Inaddition, when resource governor 500 performs this transition, resourcegovernor 500 may invoke the “publish” method to provide the event“dependent failed” to higher-level resource governors. Resource governor500 may also invoke the “resetRetries” method.

Resource governor 500 may transition from “getting ready failed” state510 back to “getting ready failed” state 510 in response to severalevents. For instance, resource governor 500 may transition from “gettingready failed” state 510 back to “getting ready failed” state 510 inresponse to a “start chain” event from chain assembly module 112, a “getready” event from a higher-level resource governor, or a “stop” eventfrom the service governor or a higher-level resource governor. Whenresource governor 500 performs any of these transitions, resourcegovernor 500 may invoke the “publish” method in order to providehigher-level resource governors with a “dependent failed” event. Whenresource governor 500 receives a “dependent ready” event and the valueof “depTaskCounted” is not true, resource governor 500 transitions from“getting ready failed” state 510 back to “getting ready failed” state510 and sets the value of “depTaskCounted” to true and decrements thevalue of “tasks.” When resource governor 500 is in “getting readyfailed” state 510 and resource governor 500 receives an “I am ready”event from the resource governed by resource governor 500, resourcegovernor 500 decrements the value of “tasks.” Similarly, when resourcegovernor 500 is in “getting ready failed” state 510 and receives an “Iam failed” event from the resource governed by resource governor 500,resource governor 500 decrements the value of “tasks.” When resourcegovernor 500 receives a “dependent failed” event and the value of“depTaskCounted” is not true, resource governor 500 transitions from“getting ready failed” state 510 back to “getting ready failed” state510 and sets the value of “depTaskCounted” to true and decrements thevalue of “tasks.” Resource governor 500 may transition from “gettingready failed” state 510 back to “getting ready failed” state 510 whenresource governor 500 receives a “dependent ready” event, a “harvest”event, a “dependent running” event, a “dependent failed” event, a “taskcomplete” event, or a “stop” event when there are one or more uses. Inthis example, resource governor 500 does not perform any action inresponse to these events.

Resource governor 500 may transition from “getting ready” state 508 to a“wait to run” state 514. When resource governor 500 is in “wait to run”state 514, the resource governed by resource governor 500 is waiting forits dependent resources to start running before starting to run itself.In particular, resource governor 500 may transition from “getting ready”state 508 to “wait to run” state 514 when the value of “tasks” equalszero and the value of “startChain” equals true. The value of “tasks”equals zero only when resource governor 500 has received a “dependentready” event that indicates that a resource dependent on the resourcegoverned by resource governor 500 is ready and when resource governor500 has received an ‘41 am ready’ event that indicates that the resourcegoverned by resource governor 500 is ready. When resource governor 500performs this transition, resource governor 500 may invoke the“propagate” method of the resource governor to provide a lower-levelresource governor with a “start” event and to instruct the lowerresource governor to reply to the “start” event with a “dependentrunning” event.

Resource governor 500 may transition from “getting ready” state 508 to a“ready” state 516. When resource governor 500 is in “ready” state 516,the resource governed by resource governor 500 and its dependentresources are ready to run. In particular, resource governor 500 maytransition from “getting ready” state 508 to “ready” state 516 when thevalue of “tasks” equals zero and the value of “startChain” equals false.The value of “tasks” equals zero only when resource governor 500 hasreceived a “dependent ready” event that indicates that a resourcedependent on the resource governed by resource governor 500 is ready andwhen resource governor 500 has received an “I am ready” event thatindicates that the resource governed by resource governor 500 is ready.When resource governor 500 performs this transition, resource governor500 may invoke the “publish” method to provide a higher-level resourcegovernor with a “dependent ready” event.

When resource governor 500 is in “wait to run” state 514, resourcegovernor 500 may transition to “complete tasks” state 512 when resourcegovernor 500 receives a “harvest” event from the service governor orreceives a “stop” event from the service governor or a higher-levelresource governor when the value returned by the “uses” method is zero.When resource governor 500 performs either of these transition from“wait to run” state 514 to “complete tasks” state 512, resource governor500 may invoke the “publish” method in order to provide a “dependentfailed” event to higher-level resource governors. In addition, resourcegovernor 500 may invoke the “resetRetries” method and sets the value of“restingState” to “startFailed.”

Resource governor 500 may also transition from “wait to run” state 514to “complete tasks” state 512 when resource governor 500 receives a“dependent failed” event from a lower-level resource governor. Whenresource governor 500 performs this transition, resource governor 500sets the value of “restingState” to “startFailed”. Resource governor 500may also invoke the “publish” method to provide a “dependent failed”event to higherlevel resource governors and may invoke the“resetRetries” method.

When resource governor 500 is in “wait to run” state 514, resourcegovernor 500 may transition to a “booting” state 518 when resourcegovernor 500 receives a “dependent running” event. While resourcegovernor 500 is in “booting” state 518, the resource governed byresource governor 500 is booting. When resource governor 500 performsthis transition, resource governor 500 may invoke the “startResource”method of the resource action module in order to cause the resourcegoverned by resource governor 500 to start booting. In addition,resource governor 500 also may invoke the “setRetries” method of theresource action module to set the value of “retries” to the valuereturned by invoking the “getRetries” method of the resource actionmodule.

Resource governor 500 may transition from “ready” state 516 to “wait torun” state 514 when resource governor 500 receives a “start” event froma higher-level resource governor. When resource governor 500 performsthis transition, resource governor 500 may invoke the “propagate” methodof the resource governor to provide a “start” event to the immediatelylower-level resource governor.

When resource governor 500 is in “wait to run” state 514, resourcegovernor 500 may transition back to “wait to run” state 514 in responseto several events. For instance, resource governor 500 may transitionback to “wait to run” state 514 when resource governor 500 receives a“start chain” event from chain assembly module 112 or a “get ready”event from a higher-level resource governor. When resource governor 500performs either of these transitions, resource governor 500 may invokethe “publish” method in order to provide higher-level resource governorswith a “dependent ready” event. Resource governor 500 may alsotransition back to “wait to run” state 514 when resource governor 500receives a “recover” event from the service governor. When resourcegovernor 500 performs this transition, resource governor 500 may invokethe “publish” method in order to provide a “recover” event tohigher-level resource governors and may invoke the “propagate” method ofthe resource governor in order to provide a “start” event to alower-level FSM and to instruct the lower resource governor to reply tothe “start” event with a “dependent running” event. Resource governor500 may transition from “wait to run” state 514 back to “wait to run”state 514 in response to an “allocate” event, a “dependent ready” event,a “stop” event, a “start” event, or a “task complete” event. In thisexample, resource governor 500 does not perform any action in responseto these events.

Resource governor 500 may also transition from “ready” state 516 to“complete tasks” state 512. In particular, resource governor 500transitions from “ready” state 516 to “complete tasks” state 512 whenresource governor 500 receives a “harvest” event from the servicegovernor or when resource governor 500 receives a “stop” event from theservice governor or a higher-level resource governor when the valuereturned by invoking the “uses” method is zero. When resource governor500 performs either of these transitions, resource governor 500 mayinvoke the “publish” method in order to provide higher-level resourcegovernors with a “dependent failed” event. In addition, resourcegovernor 500 sets the value of “restingState” to “startFailed” and mayinvoke the “resetRetries” method.

Resource governor 500 may transition from “ready” state 516 back to“ready” state 516 in response to several events. In particular, resourcegovernor 500 may transition from “ready” state 516 back to “ready” state516 when resource governor 500 receives an “allocate” event from chainassembly module 112, a “start chain” event from chain assembly module112, or a “recover” event from the service governor. When resourcegovernor 500 transitions from “ready” state 516 to “ready” state 516 inresponse to a “start chain” event, resource governor 500 may invoke the“publish” method in order to provide higher-level resource governorswith a “dependent ready” event. When resource governor 500 transitionsfrom “ready” state 516 to “ready” state 516 in response to a “recover”event, resource governor 500 may invoke the “publish” method in order toprovide higher-level resource governors with a “recover” event. Inaddition, resource governor 500 may transition from “ready” state 516back to “ready” state 516 in response to a “get ready” event from ahigher level resource governor. The “get ready” event instructs resourcegovernor 500 to prepare the resource governed by resource governor 500to run. When resource governor 500 receives the “get ready” event,resource governor 500 may invoke the “publish” method in order toprovide a “dependent ready” event to higher-level resource governors.Resource governor 500 may also transition from “ready” state 516 back to“ready” state 516 when resource governor 500 receives a “dependentready” event or a “dependent running” event from a lower-level resourcegovernor. Furthermore, resource governor 500 may transition from “ready”state 516 back to “ready” state 516 when resource governor 500 receivesa “stop” event from the service governor or from a higher-level resourcegovernor. The “stop” event instructs resource governor 500 to stop theresource if the resource is no longer in use. When resource governor 500receives a “task complete” event from the resource governed by resourcegovernor 500, resource governor 500 may transition from “ready” state516 back to “ready” state 516 without performing any additional action.Resource governor 500 may transition from “ready” state 516 back to“ready” state 516 when resource governor 500 receives an “allocate”event, a “dependent ready” event, a “stop” event, a “dependent running”event, or a “task complete” event. In this example, resource governor500 does not perform any action in response to these events.

When resource governor 500 is in “booting” state 518, resource governor500 may transition to “complete tasks” state 512 when resource governor500 receives a “dependent failed” event from a lower-level resourcegovernor. When resource governor 500 performs this transition, resourcegovernor 500 may invoke the “publish” method to provide higher-levelresource governors with a “dependent failed” event. In addition,resource governor 500 sets the value of “restingState” to “startFailed”and may invoke the “resetRetries” method.

Resource governor 500 may transition from “booting” state 518 to a“cancel boot” state 520 when one of three events occur. First, resourcegovernor 500 may transition from “booting” state 518 to “cancel boot”state 520 when resource governor 500 receives a “harvest” event from theservice governor. Second, resource governor 500 may transition from“booting” state 518 to “cancel boot” state 520 when resource governor500 receives a “dependent failed” event from a lower-level resourcegovernor. Third, resource governor 500 may transition from “booting”state 518 to “cancel boot” state 520 when resource governor 500 receivesa “stop” event from the service governor or from a higher-level resourcegovernor and when the value returned by invoking the “uses” methodequals zero. When resource governor 500 performs any of thesetransitions, resource governor 500 may invoke the “publish” method toprovide a “dependent failed” event to higher-level resource governors.

Resource governor 500 may transition from “booting” state 518 back to“booting” state 518 in response to several events. In particular,resource governor 500 may transition from “booting” state 518 back to“booting” state 518 when resource governor 500 receives a “start chain”event from chain assembly module 112. When resource governor 500performs this transition, resource governor 500 may invoke the “publish”method in order to provide a “dependent ready” event to higher-levelresource governors. Resource governor 500 may also transition from“booting” state 518 back to “booting” state 518 when resource governor500 receives a “get ready” event from a higher-level resource governor.When resource governor 500 transitions from “booting” state 518 back to“booting” state 518 in response to a “get ready” event, resourcegovernor 500 may invoke the “publish” method in order to providehigher-level resource governors with a “dependent ready” event. Whenresource governor 500 receives a “start failed” event from the resourcegoverned by resource governor 500 when the value of “retries” is greaterthan zero, resource governor 500 transitions from “booting” state 518back to “booting” state 518. Resource governor 500 may invoke the“startResource” method of the resource action module and decrements thevalue of “retries” when resource governor 500 performs this transition.Resource governor 500 may also transition from “booting” state 518 backto “booting” state 518 when resource governor 500 receives a “recover”event from the service governor. When resource governor 500 performsthis transition, resource governor 500 may invoke the “publish” methodin order to provide higher-level resource governors with a “recover”event, may invoke the “startMonitoring” method of the resource governor,may set the value of “retries” to the value returned by invoking the“getRetries” method, and may invoke the “setBootTimeout” method of theresource action module in order to start a timer, such that when thetimer expires and the computing node has not booted the resource, a“dependent failed” event is generated. Resource governor 500 maytransition from “booting” state 518 back to “booting” state 518 inresponse to an “allocate” event, a “dependent ready” event, a “stop”event, a “start” event, a “dependent running” event, an “I am failed”event, or a “task complete” event. In this example, resource governor500 does not perform any action in response to these events.

Resource governor 500 may transition from “booting” state 518 to a“running” state 522 when resource governor 500 receives an “I amrunning” event from the collector module that monitors the resourcegoverned by resource governor 500. While resource governor 500 is in“running” state 522, the resource governed by resource governor 500 isrunning and providing service. When resource governor 500 performs thistransition, resource governor 500 may invoke the “processEvent” methodof the service governor to provide the service governor with a “resourcestarted” event. Resource governor 500 may also invoke the “publish”method to provide a “dependent running” event to higher-level resourcegovernors. In addition, resource governor 500 may invoke the“cancelTimeout” method of the resource action module to cancel thetimeout clock that may have been previously set. Resource governor 500also sets the value of “retries” to zero.

When resource governor 500 is in “running” state 522, resource governor500 may transition back to “running” state 522 in response to severalevents. For instance, resource governor 500 transitions back to“running” state 522 in response to a “start chain” event from chainassembly module 112. When resource governor 500 performs thistransition, resource governor 500 may invoke the “publish” method inorder to provide higher-level resource governors with a “dependentready” event. In addition, resource governor 500 transitions from“running” state 522 back to “running” state 522 in response to a “getready” event from a higher-level resource governor. When resourcegovernor 500 performs this transition, resource governor 500 may invokethe “publish” method in order to provide a “dependent ready” event tohigher-level resource governors. When resource governor 500 is in“running” state 522 and receives a “start” event from a higher-levelresource governor, resource governor 500 transitions back to “running”state 522 and may invoke the “publish” method in order to provide a“dependent running” event to higher-level resource governors. Whenresource governor 500 receives an “I am running” event while in“running” state 522, resource governor 500 may invoke the “processEvent” method of the service governor in order to provide the servicegovernor with a “resource started” event and may also invoke the“publish” method in order to provide higher-level resource governorswith a “dependent running” method. When resource governor 500 receives a“recover” method while in “running” state 522, resource governor 500 mayinvoke the “publish” method in order to provide a “recover” event tohigher-level resource governors and may invoke the “startMonitoring”method of the resource governor. Resource governor 500 may transitionfrom “running” state 522 back to “running” state 522 in response to an“allocate” event, a “dependent ready” event, a “stop” event, a“dependent running” event, or a “task complete” event. In this example,resource governor 500 does not perform any action in response to theseevents.

When resource governor 500 is in “running” state 522, resource governor500 may transition to “complete tasks” state 512 when resource governor500 receives a “dependent failed” event. When resource governor 500performs this transition, resource governor 500 may invoke the “publish”method to provide a “dependent failed” event to higher-level resourcegovernors. In addition, resource governor 500 may invoke the“stopResource” method of the resource action module to instruct theresource governed by resource governor 500 to stop operation. Resourcegovernor 500 may also invoke the “resetRetries” method of the resourceaction module and sets the value of “restingState” to “failed”. Inaddition, resource governor 500 may invoke the “stopMonitoring” methodof resource governor 500 to instruct monitoring infrastructure 102 tostop monitoring the resource.

Resource governor 500 may transition from “running” state 522 to a “waitto stop” state 524 in response to two events. First, resource governor500 may transition from “running” state 522 to “wait to stop” state 524when resource governor 500 receives a “harvest” event from the servicegovernor. Second, resource governor 500 may transition from “running”state 522 to “wait to stop” state 524 when resource governor 500receives a “stop” event and the value returned by invoking the “uses”method is zero. When resource governor 500 performs either of thesetransitions, resource governor 500 may invoke the “publish” method toprovide a “dependent failed” event to higher-level resource governor. Inaddition, resource governor 500 may invoke the “stopResource” method ofthe resource action module in instruct the resource governed by theresource governor 500 to stop operating. When resource governor 500 isin “wait to stop” state 524, resource governor 500 waits while theresource governed by resource governor 500 stops.

Resource governor 500 may also transition from “running” state 522 to a“who failed” state 526 when resource governor 500 receives an “I amfailed” event from the resource governed by resource governor 500. Whenresource governor 500 is in “who failed” state 526, resource governor500 waits while it is determined whether the failed resource is theresource governed by resource governor 500 or a dependent resource.During the transition from “running” state 522 to “who failed” state526, resource governor 500 may invoke the “stopMonitoring” method of theresource action module to instruct monitoring infrastructure 102 to stopmonitoring the resource governed by resource governor 500. In addition,resource governor 500 may invoke a “probe” method of the resource actionmodule. The “probe” method of the resource action module determineswhether the resource is still operating. Resource governor 500 may alsoinvoke the “stopResource” method of the resource action module toinstruct the resource governed by resource governor 500 to stopoperating.

When resource governor 500 is in “who failed” state 526, resourcegovernor 500 may transition back to “who failed” state 526 in responseto several events. Resource governor 500 may transition back to “whofailed” state 526 when resource governor 500 receives a “start chain”event from chain assembly module 112. When resource governor 500performs this transition, resource governor 500 may invoke the “publish”method in order to provide a “dependent failed” event to higher-levelresource governors. In addition, resource governor 500 transitions from“who failed” state 526 back to “who failed” state 526 when resourcegovernor 500 receives a “get ready” event from a higher-level resourcegovernor. When resource governor 500 performs this transition, resourcegovernor 500 may invoke the “publish” method in order to providehigher-level resource governors with a “dependent failed” event. Whenresource governor 500 receives a “stop” event and the value returned byinvoking the “uses” method equals or does not equal zero, resourcegovernor 500 transitions from “who failed” state 526 back to “whofailed” state 526 and may invoke the “publish” method in order toprovide a “dependent failed” event to higher-level resource governors.When resource governor 500 receives a “harvest” event from the servicegovernor, resource governor 500 may invoke the “publish” method in orderto provide higher-level resource governors with a “dependent failed”event. When resource governor 500 receives a “start” event from ahigher-level resource governor, resource governor 500 may invoke the“publish” method in order to provide higher-level resource governorswith a “dependent failed” event. Resource governor 500 may transitionfrom “who failed” state 526 back to “who failed” state 526 in responseto a “dependent ready” event, an “I am failed” event, or a “taskcomplete” event. In this example, resource governor 500 does not performany action in response to these events.

Resource governor 500 may transition from “who failed” state 526 to“complete tasks” state 512 in response to any of three events. First,resource governor 500 may transition from “who failed” state 526 to“complete tasks” state 512 in response to an “It's Me” event. Second,resource governor 500 may transition from “who failed” state 526 to“complete tasks” state 512 in response to a “dependent running” event.Third, resource governor 500 may transition from “who failed” state 526to “complete tasks” state 512 in response to a “dependent failed” event.When resource governor 500 performs any of these transitions, resourcegovernor 500 may invoke the “publish” method to provide a “dependentfailed” event to higher-level FSMs. In addition, resource governor 500may invoke the “resetRetries” method and may set the value of“restingState” to “failed”.

When resource governor 500 is in “cancel boot” state 520, resourcegovernor 500 may transition to “complete tasks” state 512 when resourcegovernor 500 receives a “start failed” event from the resource governedby resource governor 500. When resource governor 500 performs thistransition, resource governor 500 may invoke the “stopMonitoring” methodof resource governor 500 to instruct monitoring infrastructure 102 tostop monitoring the resource. In addition, resource governor 500 mayinvoke the “resetRetries” method of the resource action module and mayset the value of “restingState” to “startFailed”.

Further, when resource governor 500 is in “cancel boot” state 520,resource governor 500 may transition to “wait to stop” state 524 whenresource governor 500 receives an “I am running” event from a collectormodule that monitors the resource governed by resource governor 500.During this transition, resource governor 500 may invoke the“cancelTimeout” method of the resource action module to cancel thetimeout clock. Resource governor 500 may also invoke the “processEvent”method of the service governor in order to provide the service governorwith a “resource started” event. In addition, resource governor 500 mayinvoke the “stopResource” method of the resource action module toinstruct the resource governed by resource governor 500 to stopoperating.

When resource governor 500 is in “cancel boot” state 520, resourcegovernor 500 may transition back to “cancel boot” state 520 in responseto several events. When resource governor 500 is in “cancel boot” state520, resource governor 500 may transition back to “cancel” boot state520 and invoke the “publish” method in order to provide higher-levelresource governors with a “dependent failed” event. In addition,resource governor 500 may transition back to “cancel boot” state 520when resource governor 500 receives a “get ready” event from ahigher-level resource governor. When resource governor 500 performs thistransition, resource governor 500 may invoke the “publish” method inorder to provide higher-level resource governors with a “dependentfailed” event. Similarly, when resource governor 500 receives a “start”event from a higher-level resource governor, resource governor 500transitions back to “cancel boot” state 520 and may invoke the “publish”method in order to provide higher-level resource governors with a“dependent failed” event. Resource governor 500 may transition from“cancel boot” state 520 back to “cancel boot” state 520 when resourcegovernor 500 receives a “dependent ready” event, a “stop” event, a“harvest” event, a “dependent ready” event, a “dependent failed” event,or a “task complete” event. In this example, resource governor 500 doesnot perform any action in response to these events.

Resource governor 500 may transition from “wait to stop” state 524 to“complete tasks” state 512 when resource governor 500 receives a “stopfailed” event from the resource governed by resource governor 500. Whenresource governor 500 performs this transition, resource governor 500may invoke the “stopMonitoring” method of resource governor 500 toinstruct monitoring infrastructure 102 to stop monitoring the resourcegoverned by resource governor 500. In addition, resource governor 500may invoke the “publish” method to provide a “dependent failed” event tohigher-level resource governors. Resource governor 500 may also set thevalue of “restingState” to “stopFailed”.

Resource governor 500 may transition from “wait to stop” state 524 to“complete tasks” state 512 when resource governor 500 receives an “I amfailed” event from the resource governed by resource governor 500. Whenresource governor 500 performs this transition, resource governor 500may invoke the “stopMonitoring” method of resource governor 500 toinstruct monitoring infrastructure 102 to stop monitoring the resourcegoverned by resource governor 500. In addition, resource governor 500may invoke the “resetRetries” method of the resource action module andmay set the value of “restingState” to “stopped.”

Resource governor 500 may transition from “wait to stop” state 524 backto “wait to stop” state 524 in response to several events. For instance,resource governor 500 may transition back to “wait to stop” state 524when resource governor 500 receives a “start chain” event from chainassembly module 112, a “get ready” event from a higher-level resourcegovernor, a “stop” event from the service governor or a higher-levelresource governor, or a “harvest” event from the service governor. Whenresource governor 500 receives any of these events, resource governor500 may invoke the “publish” method in order to provide a “dependentfailed” event to higher-level resource governors. Resource governor 500may also transition from “wait to stop” state 524 back to “wait to stop”state 524 when resource governor 500 receives an “I am running” eventfrom a collector module that monitors the resource governed by resourcegovernor 500. When resource governor 500 performs this transition,resource governor 500 may invoke the “stopResource” method of theresource action module to instruct the resource governed by resourcegovernor 500 to stop operating. In addition, resource governor 500 maytransition from “wait to stop” state 524 back to “wait to stop” state524 when resource governor 500 receives a “recover” event from theservice governor. When resource governor 500 performs this transition,resource governor 500 may invoke the “publish” method in order toprovide a “recover” event to higher-level resource governors, may invokethe “startMonitoring” method of resource governor 500, and may invokethe “stopResource” method of the resource action module. Resourcegovernor 500 may transition from “wait to stop” state 524 back to “waitto stop” state 524 when resource governor 500 receives a “dependentready” event, a “dependent running” event, a “dependent failed” event,or a “task complete” event. In this example, resource governor 500 doesnot perform any action in response to these events.

When resource governor 500 is in “complete tasks” state 512, resourcegovernor 500 may transition back to “complete tasks” state 512 inresponse to several events. For instance, resource governor 500 maytransition from “complete tasks” state 512 back to “complete tasks”state 512 when resource governor 500 receives a “start chain” event fromchain assembly module 112, a “get ready” event from a higher-levelresource governor, a “stop” event from the service governor or ahigher-level resource governor, or a “dependent failed” event from alower-level resource governor. When resource governor 500 performs anyof these transitions, resource governor 500 may invoke the “publish”method in order to provide higher-level resource governors with a“dependent failed” event. Resource governor 500 may transition from“complete tasks” state 512 back to “complete tasks” state 512 inresponse to an “allocate” event, a “dependent ready” event, an “I amready” event, a “harvest” event, a tasks equals zero condition, an “I amrunning” event, a “start failed” event, an “I failed” event, a“dependent failed” event, an “It is me” event, a “stop failed” event, ora “task complete” event. In this example, resource governor 500 does notperform any action in response to these events.

When resource governor 500 is in “complete tasks” state 512, resourcegovernor 500 may transition to a “stopped” state 528. When resourcegovernor 500 is in “stopped” state 528, the resource governed byresource governor 500 has stopped naturally. Resource governor 500 mayperform this transition when the value returned by invoking the“getTaskCount” method equals zero, and the value of “restingState”equals “stopped”. When resource governor 500 performs this transition,resource governor 500 may invoke the “process Event” method of theservice governor to provide the service governor with a “resourcestopped” event.

When resource governor 500 is in “stopped” state 528, resource governor500 may transition back to “stopped” state 528 in response to severalevents. For instance, resource governor 500 may transition back to“stopped” state 528 when resource governor 500 receives a “start chain”event from chain assembly module 112, a “get ready” event from ahigher-level resource governor, a “stop” event from the service governoror a higher-level resource governor, or a “dependent running” event froma lower-level resource governor. When resource governor 500 performs anyof these transitions, resource governor 500 may invoke the “publish”method in order to provide higher-level resource governors with a“dependent failed” event. Resource governor 500 may also transition from“stopped” state 528 back to “stopped” state 528 or when resourcegovernor 500 receives a “recover” event from the service governor. Whenresource governor 500 performs this transition, resource governor 500may invoke the “publish” method in order to provide higher-levelresource governors with a “recover” event. Resource governor 500 maytransition from “stopped” state 528 back to “stopped” state 528 whenresource governor 500 receives a “task complete” event. In this example,resource governor 500 does not perform any action in response to thisevent.

Resource governor 500 may also transition from “complete tasks” state512 to a “failed” state 530. When resource governor 500 is in “failed”state 530, the resource governed by resource governor 500 has failed.Resource governor 500 may perform this transition when the valuereturned by invoking the “getTaskCount” method equals zero, the valuereturned by invoking the “uses” method equals zero, and the value of“restingState” equals “failed”. When resource governor 500 performs thistransition, resource governor 500 may invoke the “processEvent” methodof the service governor to provide the service governor with a “resourcefailed” event.

When resource governor 500 is in “failed” state 530, resource governor500 may transition back to “failed” state 530 in response to severalevents. For instance, resource governor 500 may transition back to“failed” state 530 when resource governor 500 receives a “start chain”event from chain assembly module 112, a “get ready” event from ahigher-level resource governor, a “stop” event from the service governoror a higher-level resource governor, or a “dependent running” event froma lower-level resource governor. When resource governor 500 performs anyof these transitions, resource governor 500 may invoke the “publish”method in order to provide higher-level resource governor with a“dependent failed” event. Resource governor 500 may also transition from“failed” state 530 back to “failed” state 530 when resource governor 500receives a “recover” event from the service governor. When resourcegovernor 500 performs this transition, resource governor 500 may invokethe “publish” method in order to provide higher-level resource governorswith a “recover” event. In addition, resource governor 500 maytransition from “failed” state 530 back to “failed” state 530 whenresource governor 500 receives a “task complete” event. In this example,resource governor 500 does not perform any action in response to thisevent.

Resource governor 500 may also transition from “complete tasks” state512 to a “start failed” state 532. When resource governor 500 is in“start failed” state 532, the resource governed by resource governor 500has failed to start after being allocated. Resource governor 500 mayperform this transition when the value returned by invoking the“getTaskCount” method equals zero, the value returned by invoking the“uses” method equals zero, and the value of “restingState” equals“startFailed”. When resource governor 500 performs this transition,resource governor 500 may invoke the “processEvent” method of theservice governor to provide the service governor with a “resource startfailed” event.

When resource governor 500 is in “start failed” state 532, resourcegovernor 500 may transition back to “start failed” state 532 in responseto several events. For instance, resource governor 500 may transitionback to “start failed” state 532 when resource governor 500 receives a“start chain” event from chain assembly module 112, a “get ready” eventfrom a higher-level resource governor, a “stop” event from the servicegovernor or a higher-level resource governor, or a “dependent running”event from a lower-level resource governor. When resource governor 500performs any of these transitions, resource governor 500 may invoke the“publish” method in order to provide higher-level resource governor witha “dependent failed” event. Resource governor 500 may also transitionfrom “start failed” state 532 back to “start failed” state 532 whenresource governor 500 receives a “recover” event from the servicegovernor. When resource governor 500 performs this transition, resourcegovernor 500 may invoke the “publish” method in order to providehigher-level resource governors with a “recover” event.

Resource governor 500 may also transition from “complete tasks” state512 to a “stop failed” state 534. When resource governor 500 is in “stopfailed” state 534, the resource governed by resource governor 500 hasfailed to stop when requested. Resource governor 500 may perform thistransition when the value returned by invoking the “getTaskCount” methodequals zero, the value returned by invoking the “uses” method equalszero, and the value of “restingState” equals “stopFailed”. When resourcegovernor 500 performs this transition, resource governor 500 may invokethe “processEvent” method of service governor 450 to provide servicegovernor 450 with a “resource stop failed” event.

When resource governor 500 is in “stop failed” state 534, resourcegovernor 500 may transition back to “stop failed” state 534 in responseto several events. For instance, resource governor 500 may transitionback to “stop failed” state 534 when resource governor 500 receives a“start chain” event chain assembly module 112, a “get ready” event froma higher-level resource governor, a “stop” event from service governor450 or a higher-level resource governor, or a “dependent running” eventfrom a lower-level resource governor. When resource governor 500performs any of these transitions, resource governor 500 may invoke the“publish” method in order to provide higher-level resource governorswith a “dependent failed” event. Resource governor 500 may alsotransition from “stop failed” state 534 back to “stop failed” state 534when resource governor 500 receives a “recover” event from servicegovernor 450. When resource governor 500 performs this transition,resource governor 500 may invoke the “publish” method in order toprovide higher-level resource governors with a “recover” event. Resourcegovernor 500 may transition from “stop failed” event 534 back to “stopfailed” event 534 when resource governor 500 receives a “dependentfailed” event or a “task complete” event. In this example, resourcegovernor 500 does not perform any action in response to these events.

Resource governor 500 may transition from “stopped” state 528, from“failed” state 530, from “start failed” state 532, and from “stopfailed” state 534 to “final” state 506 when resource governor 500receives a “destroy” event from service governor 450. The “destroy”event instructs resource governor 500 to destroy the resource governedby resource governor 500. When resource governor 500 is in “final” state506, the resource governed by resource governor 500 has been destroyed.

When resource governor 500 is in “final” state 506, resource governor500 may transition back to “final” state 506 when resource governor 500receives any of several events. For instance, resource governor 500 maytransition back to “final” state 506 when resource governor 500 receivesa “start chain” event from chain assembly module 112, a “get ready”event from a higher-level resource governor, a “stop” event from servicegovernor 450 or a higher-level resource governor, a “harvest” event fromchain assembly module 112, or a “start” event from a higher-levelresource governor. When resource governor 500 performs any of thesetransitions, resource governor 500 may invoke the “publish” method inorder to provide higher-level resource governors with a “dependentfailed” event. In addition, resource governor 500 may transition from“final” state 506 back to “final” state 506 when resource governor 500receives a “dependent ready” event, a “dependent running” event, an “Iam failed” event, a “dependent failed” event, a “recover” event, or a“task complete” event. In this example, resource governor 500 does notperform any action in response to these events.

In the example of FIG. 16, resource governor 500 may persist the statevariables resource governor 500 when resource governor 500 transitionsinto “unallocated” state 502, “allocated” state 504, “ready” state 516,“wait to run” state 514, “booting” state 518, “running” state 522, “waitto stop” state 524, “stopped” state 528, “failed” sate 530, “startfailed” state 532, “stop failed” state 534, and “final” state 506.

FIG. 17 is a block diagram illustrating example details of SLA governor430A. While FIG. 17 is explained with regard to SLA governor 430A, itwill be understood that SLA governors 430B through 430N may also includethe same details. In the illustrated embodiment, SLA governor 430Aincludes a rule compiler 552 and an execution engine 554. Each of rules550 represents a unit of code that conforms to a rule language andexpresses a set of triggering conditions and a set of implied actions.When the conditions are met, the actions are eligible to be performed.The following is one example of a configuration rule:

rule checkServiceCapacity { Service s where status != “overloaded”;LoadParameter p where p.currentResponseTime < s.requireResponseTime; } >{ s.status = “overloaded”;  }; }When installed, this example rule marks a service as “overloaded” whenthe current response time of a service is less than the response timerequired for the service by a service-level agreement. The followingrepresents another example rule for automatically outputting an event toa service governor of a service to increase the capacity of distributedcomputing system 2 to provide the service:

rule serviceOverload { Service s where status == “overloaded”; } > {uctl(s.serviceGovernor); }Rule compiler 552 may compile each of rules 550 and translate matchconditions of the rules into a discrimination network that avoidsredundant tests during rule execution. Execution engine 554 handles ruleadministration, object insertion and retrieval, rule invocation andexecution of rule actions. In general, execution engine 554 firstmatches a current set of rules 550 against a current state of workingmemory 556 and local objects 558. Execution engine 554 then collects allrules that match as well as the matched objects and selects a particularrule instantiation to fire. Next, execution engine 554 fires (executes)the instantiated rule and propagates any changes to working memory 556.Execution engine 554 repeats the process until no more matching ruleinstantiations can be found.

Firing of a rule typically produces a very small number of changes toworking memory 556. This allows sophisticated rule engines to scale byretaining match state between cycles. Only the rules and ruleinstantiations affected by changes are updated, thereby avoiding thebulk of the matching process. One exemplary algorithm that may be usedby execution engine 554 to handle the matching process includes the RETEalgorithm that creates a decision tree that combines the patterns in allthe rules and is intended to improve the speed of forward-chained rulesystem by limiting the effort required to recompute a conflict set aftera rule is fired. One example of a RETE algorithm is described in Forgy,C. L.: 1982, “RETE: a fast algorithm for the many pattern/many objectpattern match problem”, Artificial Intelligence 19, 1737, herebyincorporated by reference. Other alternatives include the TREATalgorithms, and LEAPS algorithm, as described by Miranker, D. P.:“TREAT: A New and Efficient Match Algorithm for AI Production Systems”.ISBN 0934613710 Daniel P. Miranker, David A. Brant, Bernie Lofaso, DavidGadbois: On the Performance of Lazy Matching in Production Systems. AAAI1990: 685692, each of which are hereby incorporated by reference.

FIG. 18 is a block diagram of an example working memory 556 associatedwith SLA governor 430A as illustrated in FIG. 17. In this example,working memory 556 includes a first data region 570 that stores the datarepresenting a service-level agreement. In this example working memory,data region 570 may only be modified in response to a trigger fromsensor subsystem 420 or by execution engine 554 without notificationfrom administrating interface module 112.

In addition, working memory 556 includes a second data region 572 thatis modifiable (i.e., read/write) and may be updated by monitoringinfrastructure 102 or used internally by execution engine 554. Ingeneral, data region 572 stores aggregated data representing the actualstate of the fabric and can be updated by sensor subsystem 420 or byexecution engine 554. The actual state may consist of a set of propertyannotations that can be attached to services defined in a service-levelagreement, or to services locally defined within a rule engine, such aslocal object 574.

The functions described in this disclosure may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored as one or more instructions orcode on a computer-readable medium. Computer-readable media includesboth computer storage media and communication media. A storage media maybe any available media that can be accessed by a computer. By way ofexample, and not limitation, such computer-readable media can compriseRAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic diskstorage or other magnetic storage devices, or any other medium that canbe used to carry or store desired program code in the form ofinstructions or data structures and that can be accessed by a computer.Disk and disc, as used herein, includes compact disc (CD), laser disc,optical disc, digital versatile disc (DVD), floppy disk and blu-ray discwhere “disks” usually reproduce data magnetically, while “discs”reproduce data optically with lasers. Combinations of the above shouldalso be included within the scope of computer-readable media.

Various embodiments of the invention have been described. These andother embodiments are within the scope of the following claims.

What is claimed is:
 1. A system comprising: a first set of resourcegovernors, each of which implement a finite state machine, the first setof resource governors configured to cause an individual resource in afirst set of resources to start providing or stop providing a fluxservice, the resources in the first set of resources configured toprovide the flux service, the flux service being a top-level servicethat represents a defined set of functionalities, the first set ofresources using interpretation services provided by a second set ofresources, each of the interpretation services representing a definedset of functionalities; a first service governor distinct from the firstset of resource governors, the first service governor implementing afinite state machine that controls whether resource governors in thefirst set of resource governors initiate the processes that causeresources in the first set of resources to start providing or stopproviding the flux service; a service-level agreement governor thatreceives monitoring data that indicates a current service level of theflux service and causes the first service governor to enhance a servicelevel of the flux service when the current service level of the fluxservice does not satisfy a service-level agreement, wherein theservice-level agreement describes an expected level of service for theflux service; and wherein the service-level agreement governor uses aset of rules to determine whether the current service level of the fluxservice satisfies the service-level agreement and causes the firstservice governor to enhance the service level of the flux service whenthe current service level of the flux service does not satisfy theservice-level agreement.
 2. The system of claim 1, wherein each rule inthe set of rules conforms to a rule language and expresses a set oftriggering conditions and a set of actions, such that when thetriggering conditions are met, the actions are eligible to be performed.3. The system of claim 1, wherein the first set of resources comprises afirst resource that is capable of providing the flux service; whereinthe first set of resource governors comprises a first resource governorthat governs the first resource; wherein the second set of resourcescomprises a second resource that is capable of providing a firstinterpretation service to the first resource; wherein the control nodefurther comprises a second resource governor that governs the secondresource; wherein the first resource governor is configured to provide afirst event to the second resource governor that causes the secondresource governor to cause the second resource to start providing thesecond service; and wherein the second resource governor provides asecond event to the first resource governor when the second resource hasstarted providing the second service, the second event causing the firstresource governor to cause the first resource to start providing theflux service.
 4. The system of claim 1, wherein the control node furthercomprises a monitoring infrastructure that receives status data fromresources in the first set of resources and the second set of resourcesand outputs the monitoring data to the service-level agreement governor,the status data representing an actual state of the first set ofresources.
 5. The system of claim 4, wherein the monitoringinfrastructure comprises a plurality of collector modules, and whereineach of the collector modules is a pluggable software object thatcollects status data from one or more of the resources.
 6. The system ofclaim 1, wherein the service-level agreement governor is configured toimplement a finite state machine that determines whether the currentservice level of the flux service satisfies the service-level agreementand cause the first service governor to enhance the service level of theflux service when the current service level of the flux service does notsatisfy the service-level agreement.
 7. The system of claim 1, whereinthe service-level agreement governor is configured to: determine whetherthe monitoring data indicates that the current service level of the fluxservice is greater than is required by the service-level agreement; andoutput an event that instructs the first service governor to reduce thecurrent service level of the flux service in response to determiningthat the current service level of the flux service is greater than isrequired by the service-level agreement.
 8. The system of claim 1,wherein the service-level agreement governor is configured to: determinethat the current service level of the flux service does not satisfy theservice-level agreement; provide an event to the first service governorin response to determining that the current service level of the fluxservice does not satisfy the service-level agreement, the eventinstructing the first service governor to enhance the current servicelevel of the flux service.
 9. The system of claim 8, wherein: thecontrol node comprises a chain assembly module configured to dynamicallyassemble a resource chain, the resource chain comprising a plurality ofresources that are ordered according to services provided by theplurality of resources, the plurality of resources comprising the firstresource and one or more resources in the second set of resources; andin response to the event provided by the service-level agreementgovernor, the first service governor is configured to enhance theservice level of the flux service by instructing the chain assemblymodule to assemble the resource chain when the finite state machine ofthe first service governor is in a first state.
 10. The system of claim9, wherein, in response to the event from the service-level agreementgovernor, the first service governor is configured not to instruct thechain assembly module to assemble the resource chain when the finitestate machine of the first service governor is in a second state. 11.The system of claim 9, wherein the chain assembly module comprises: aservice matching module configured to identify one or more servicechains that include the flux service, wherein each service chain of theone or more service chains comprises a plurality of resources that areordered according to services provided the plurality of resources; aresource chain identification module configured to identify one or morecandidate resource chains for each of the identified service chains; acost analysis module configured to select one of the candidate resourcechains based on the assembly cost of the one or more candidate resourcechains; and a resource reservation module configured to cause theselected candidate resource to chain to be assembled.
 12. The system ofclaim 11, wherein: the first service governor is configured to updatethe status of each resource in the first set of resources; and the costanalysis module is configured to use a status of the first resource whendetermining the assembly cost associated with the one or more candidateresource chains that include the first resource.
 13. The system of claim12, wherein the first service governor is configured to update thestatus of the first resource in response to an event from the firstresource governor.
 14. The system of claim 9, wherein the first resourcegovernor is configured to cause the first resource to start providingthe first service chain when the assembly module assembles the resourcechain.
 15. The system of claim 1, wherein: the finite state machine ofthe first service governor is configured to transition from a firststate to a second state in response to an event provided by a user tothe service governor; and the first service governor is configured toinstruct at least one resource governor in the first set of resourcegovernors to cause at least one resource in the first set of resourcesto stop providing the flux service.
 16. The system of claim 1, whereinthe service-level agreement specifies an expected level of performanceof the flux service.
 17. The system of claim 1, wherein the second setof resources comprises: a first resource that is implemented ashardware; and a second resource that is implemented as software.
 18. Thesystem of claim 1, wherein the control node further comprises: a secondset of resource governors, each of which implement a finite statemachine that governs a process that causes an individual resource in thesecond set of resource governors to start providing or stop providingone of the interpretation services; and a set of service governors,wherein each service governor in the set of service governors implementsa finite state machine that controls whether resource governors in thesecond set of resource governors cause resources in the second set ofresources to start providing or stop providing the interpretationservices.
 19. The system of claim 1, wherein at least two differentresources in the first set of resources work together to provide theflux service.
 20. A method comprising: receiving status data fromresources that provide services in a distributed computing system,wherein each of the services provides a defined set of functionalities;determining, using at least one processor, whether a current servicelevel of a flux service provided by the distributed computer systemsatisfies a service-level agreement by comparing the status data to aset of rules; wherein the flux service is a top-level service; whereinthe service-level agreement describes an expected level of service forthe flux service; instructing, using the at least one processor, when afinite state machine of a first service governor is in a first state andwhen the current service level of the flux service does not satisfy theservice-level agreement, a first resource governor distinct from thefirst service governor to cause a first resource in a first set ofresources to start providing the flux service; wherein each resource inthe first set of resources is capable of providing the flux service; andcausing, using the at least one processor and a finite state machine ofthe first resource governor, the first resource in the first set ofresources to start providing the flux service.
 21. The method of claim20, wherein each rule in the set of rules conforms to a rule languageand expresses a set of triggering conditions and a set of actions, suchthat when the triggering conditions are met, the actions are eligible tobe performed.
 22. The method of claim 20, wherein causing the firstresource in the first set of resources to start providing the fluxservice comprises: providing, with the first resource governor, an eventto a second resource governor that instructs the second resourcegovernor to cause a second resource in the second set of resources tostart providing an interpretation service to the first resource; andcausing, with a finite state machine of the second resource governor,the second resource to start providing the interpretation service. 23.The method of claim 20, wherein causing the first resource in the firstset of resources to start providing the flux service comprises: inresponse to the finite state machine of the first resource performing astate transition, communicating, with a first resource action module,instructions to the first resource to cause the first resource to startproviding the flux service.
 24. The method of claim 20, whereinreceiving the status data further comprises receiving the status datausing one or more of collector modules specified by a service definitionobject.
 25. The method of claim 20, further comprising: using the statusdata to determine whether the current service level of the flux serviceis greater than is required by the service-level agreement; instructing,when the finite state machine of the first service governor is in thefirst state and when the current service level of a flux service isgreater than is required by the service-level agreement, the firstresource governor to cause the first resource to stop providing the fluxservice; and causing, with the finite state machine of the firstresource governor, the first resource to stop providing the fluxservice.
 26. The method of claim 20, further comprising communicating anevent to the first service governor that causes the first servicegovernor to enhance the current service level of the flux service whenthe current service level of flux service does not satisfy theservice-level agreement.
 27. The method of claim 26, further comprising:dynamically assembling, when the finite state machine of the firstservice governor is in the first state and the first service governorreceives the event, a resource chain that includes the first resourceand one or more additional resources; wherein the one or more additionalresources provide interpretation services; wherein the resource chaincomprises a plurality of resources that are ordered according toservices provided by the plurality of resources; and enhancing thecurrent service level of the flux service by causing the resources inthe resource chain to start operating.
 28. The method of claim 27,further comprising generating an error message in response to the firstservice governor receiving the event when the finite state machine ofthe first service governor is in a second state different than the firststate.
 29. The method of claim 27, wherein dynamically assembling theresource chain comprises: identifying one or more service chains thatinclude the flux service; identifying one or more candidate resourcechains based on the identified service chains; selecting one of thecandidate resource chains based on the assembly cost of each of thecandidate resource chains; and assembling the selected candidateresource chain.
 30. The method of claim 29, further comprising:updating, with the first service governor, statuses of the resources inthe first set of resources; and wherein selecting one of the candidateresource chains comprises using a status of the first resource todetermine the assembly costs of the candidate resource chains thatinclude the first resource.
 31. The method of claim 27, wherein causingresources in the resource chain to start operating comprises:instructing, when a finite state machine of a second service governor isin a third state, a second resource governor to cause a second resourceto start providing an interpretation service; and causing, with thefinite state machine of the second resource governor, the secondresource to start providing the interpretation service.
 32. The methodof claim 20, further comprising: receiving an event from a user;transitioning, in response to the event from the user, from the firststate of the finite state machine of the first service governor to asecond state of the finite state machine of the first service governor;instructing, with the first service governor when the finite statemachine of the first service governor transitions from the first stateto the second state, at least one resource governor in the first set ofresource governors to cause at least one resource in the first set ofresources to stop providing the flux service.
 33. The method of claim20, wherein the service-level agreement specifies an expected level ofperformance of the flux service.
 34. At least one non-transitory,computer-readable medium comprising code that, when executed by at leastone processor, is configured to: receive status data from resources thatprovide services in a distributed computing system, wherein each of theservices provides a defined set of functionalities; determine whether acurrent service level of a flux service provided by the distributedcomputer system satisfies a service-level agreement by comparing thestatus data to a set of rules; wherein the flux service is a top-levelservice; wherein the service-level agreement describes an expected levelof service for the flux service; instruct, when a finite state machineof a first service governor is in a first state and when the currentservice level of the flux service does not satisfy the service-levelagreement, a first resource governor distinct from the first servicegovernor to cause a first resource in a first set of resources to startproviding the flux service; wherein each resource in the first set ofresources is capable of providing the flux service; and cause the firstresource in the first set of resources to start providing the fluxservice.
 35. The at least one computer-readable medium of claim 34,wherein each rule in the set of rules conforms to a rule language andexpresses a set of triggering conditions and a set of actions, such thatwhen the triggering conditions are met, the actions are eligible to beperformed.
 36. The at least one computer-readable medium of claim 34,wherein the code configured to cause the first resource in the first setof resources to start providing the flux service comprises codeconfigured to: provide an event to a second resource governor thatinstructs the second resource governor to cause a second resource in thesecond set of resources to start providing an interpretation service tothe first resource; and cause the second resource to start providing theinterpretation service.
 37. The at least one computer-readable medium ofclaim 34, wherein the code configured to cause the first resource in thefirst set of resources to start providing the flux service comprisescode configured to: in response to the finite state machine of the firstresource performing a state transition, communicate instructions to thefirst resource to cause the first resource to start providing the fluxservice.
 38. The at least one computer-readable medium of claim 34,wherein the code configured to receive the status data further comprisescode configured to receive the status data using one or more ofcollector modules specified by a service definition object.
 39. The atleast one computer-readable medium of claim 34, wherein the code isfurther configured to: use the status data to determine whether thecurrent service level of the flux service is greater than is required bythe service-level agreement; instruct, when the finite state machine ofthe first service governor is in the first state and when the currentservice level of a flux service is greater than is required by theservice-level agreement, the first resource governor to cause the firstresource to stop providing the flux service; and cause the firstresource to stop providing the flux service.
 40. The at least onecomputer-readable medium of claim 34, wherein the code is furtherconfigured to communicate an event to the first service governor thatcauses the first service governor to enhance the current service levelof the flux service when the current service level of flux service doesnot satisfy the service-level agreement.
 41. The at least onecomputer-readable medium of claim 40, wherein the code is furtherconfigured to: dynamically assemble, when the finite state machine ofthe first service governor is in the first state and the first servicegovernor receives the event, a resource chain that includes the firstresource and one or more additional resources; wherein the one or moreadditional resources provide interpretation services; wherein theresource chain comprises a plurality of resources that are orderedaccording to services provided by the plurality of resources; andenhance the current service level of the flux service by causing theresources in the resource chain to start operating.
 42. The at least onecomputer-readable medium of claim 41, wherein the code is furtherconfigured to generate an error message in response to the first servicegovernor receiving the event when the finite state machine of the firstservice governor is in a second state different than the first state.43. The at least one computer-readable medium of claim 41, wherein thecode configured to dynamically assemble the resource chain comprises thecode configured to: identify one or more service chains that include theflux service; identify one or more candidate resource chains based onthe identified service chains; select one of the candidate resourcechains based on the assembly cost of each of the candidate resourcechains; and assemble the selected candidate resource chain.
 44. The atleast one computer-readable medium of claim 43, wherein the code isfurther configured to: update, with the first service governor, statusesof the resources in the first set of resources; and wherein the codeconfigured to select one of the candidate resource chains comprises codeconfigured to use a status of the first resource to determine theassembly costs of the candidate resource chains that include the firstresource.
 45. The at least one computer-readable medium of claim 41,wherein the code configured to cause resources in the resource chain tostart operating comprises code configured to: instruct, when a finitestate machine of a second service governor is in a third state, a secondresource governor to cause a second resource to start providing aninterpretation service; and cause the second resource to start providingthe interpretation service.
 46. The at least one computer-readablemedium of claim 34, wherein the code is further configured to: receivean event from a user; cause, in response to the event from the user, thefinite state machine of the first service governor to transition fromthe first state to a second state; instruct, when the finite statemachine of the first service governor transitions from the first stateto the second state, at least one resource governor in the first set ofresource governors to cause at least one resource in the first set ofresources to stop providing the flux service.
 47. The at least onecomputer-readable medium of claim 34, wherein the service-levelagreement specifies an expected level of performance of the fluxservice.